Attachment 'modern.patch'

Download

   1 --- share/moin/htdocs/modern/css/screen.css.orig	Thu Apr  5 18:26:32 2007
   2 +++ share/moin/htdocs/modern/css/screen.css	Thu Apr  5 18:26:37 2007
   3 @@ -251,6 +251,55 @@
   4      background: #81BBF2; /* url(../img/tab-selected.png) repeat-x; */
   5  }
   6  
   7 +
   8 +#langbar {
   9 +    display: block;
  10 +    margin: 0;
  11 +    padding: 0 10px;
  12 +    font-size: 0.82em;
  13 +    zoom: 1; /* for avoiding a gap between navibar and pageline on IE */
  14 +}
  15 +
  16 +#langbar li {
  17 +    float: right;
  18 +    display: inline;
  19 +    margin: 0 2px;
  20 +    padding: 2px 5px;
  21 +    border: 1px solid #9C9C9C;
  22 +    border-bottom: none;
  23 +    white-space: nowrap;
  24 +}
  25 +
  26 +*[dir="rtl"] #langbar li {
  27 +    float: left;
  28 +}
  29 +
  30 +#langbar li.wikilink {
  31 +    background: white; /*url(../img/tab-wiki.png) repeat-x;*/
  32 +}
  33 +
  34 +#langbar li.userlink {
  35 +    background: #E6EAF0; /*url(../img/tab-user.png) repeat-x;*/
  36 +}
  37 +
  38 +#langbar a, #langbar a:visited {
  39 +    color: black;
  40 +    text-decoration: none;    
  41 +}
  42 +
  43 +#langbar li.current a {
  44 +    font-weight: bold;
  45 +}
  46 +
  47 +#langbar li:hover {
  48 +    background: #CCCCCC;
  49 +}
  50 +
  51 +#langbar li.current, #langbar li.current:hover {
  52 +    background: #81BBF2; /* url(../img/tab-selected.png) repeat-x; */
  53 +}
  54 +
  55 +
  56  #pageline {
  57      clear: both;
  58      margin: 0;
  59 --- lib/python2.4/site-packages/MoinMoin/theme/modern.py.orig	Thu Apr  5 18:28:26 2007
  60 +++ lib/python2.4/site-packages/MoinMoin/theme/modern.py	Thu Apr  5 18:27:59 2007
  61 @@ -34,6 +34,7 @@
  62              u'</div>',
  63              self.trail(d),
  64              self.navibar(d),
  65 +            self.langbar(d),
  66              #u'<hr id="pageline">',
  67              u'<div id="pageline"><hr style="display:none;"></div>',
  68              self.msg(d),
  69 @@ -47,6 +48,32 @@
  70              self.startPage(),
  71          ]
  72          return u'\n'.join(html)
  73 +
  74 +    def langbar(self, d):
  75 +        """ Create language bar """
  76 +        from types import *
  77 +	from MoinMoin.Page import Page
  78 +        _ = self.request.getText
  79 +
  80 +        page_title = d['page_name']
  81 +        lang_links = []
  82 +        request = self.request
  83 +        for d in  request.dicts.keydict(page_title):
  84 +                trans = request.dicts.dict(d)[page_title]
  85 +                if not isinstance(trans, int):
  86 +                        translated_page = Page(request, trans)
  87 +                        if translated_page.exists():
  88 +                                lang_links.append(translated_page.link_to(request, d.replace('Dict','')))
  89 +
  90 +        if lang_links:
  91 +                html = [
  92 +                        u'<ul id="langbar"><li>',
  93 +                        u'</li>\n<li>'.join(lang_links),
  94 +                        u'</li></ul>'
  95 +                        ]
  96 +                return u'\n'.join(html)
  97 +        else:
  98 +                return u''
  99  
 100      def editorheader(self, d, **kw):
 101          """ Assemble wiki header for editor

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-04-05 22:30:23, 2.7 KB) [[attachment:modern.patch]]
  • [get | view] (2007-04-11 04:59:29, 4.2 KB) [[attachment:modern_v2.patch]]
  • [get | view] (2010-10-13 05:21:50, 2.9 KB) [[attachment:simpler.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.