Attachment 'advert.patch'

Download

   1 * looking for nirs@freeshell.org--2005/moin--fix--1.3--patch-27 to compare with
   2 * comparing to nirs@freeshell.org--2005/moin--fix--1.3--patch-27
   3 M  MoinMoin/theme/modern.py
   4 M  wiki/htdocs/modern/css/screen.css
   5 M  MoinMoin/theme/__init__.py
   6 M  MoinMoin/user.py
   7 
   8 * modified files
   9 
  10 --- orig/MoinMoin/theme/__init__.py
  11 +++ mod/MoinMoin/theme/__init__.py
  12 @@ -1001,6 +1001,12 @@
  13      def endPage(self):
  14          """ End page div """
  15          return '</div> <!-- end page -->\n'        
  16 +
  17 +    def adverts(self):
  18 +        """ Return adverts defined in the wiki config """
  19 +        if self.request.user.show_adverts:
  20 +            return '<div id="adverts">%s</div>' % self.request.cfg.adverts
  21 +
  22      
  23      # Public functions #####################################################
  24  
  25 
  26 
  27 --- orig/MoinMoin/theme/modern.py
  28 +++ mod/MoinMoin/theme/modern.py
  29 @@ -68,6 +68,7 @@
  30              # Footer
  31              u'<div id="footer">',
  32              self.editbar(d),
  33 +            self.adverts(),
  34              self.credits(d),
  35              self.showversion(d, **keywords),
  36              u'</div>',
  37 
  38 
  39 --- orig/MoinMoin/user.py
  40 +++ mod/MoinMoin/user.py
  41 @@ -203,6 +203,7 @@
  42           ('remember_me', lambda _: _('Remember login information')),
  43           ('want_trivial', lambda _: _('Subscribe to trivial changes')),
  44           ('disabled', lambda _: _('Disable this account forever')),
  45 +         ('show_adverts', lambda _: _('Show adverts')),
  46      ]
  47      _transient_fields =  ['id', 'valid', 'may', 'auth_username', 'trusted']
  48  
  49 
  50 
  51 --- orig/wiki/htdocs/modern/css/screen.css
  52 +++ mod/wiki/htdocs/modern/css/screen.css
  53 @@ -312,6 +312,8 @@
  54  	vertical-align: middle;
  55  }
  56  
  57 +#adverts {text-align: center; margin-top: 10px;}
  58 +
  59  .diff {
  60  	width:99%;
  61  }

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] (2005-05-08 00:40:00, 1.7 KB) [[attachment:advert.patch]]
 All files | Selected Files: delete move to page copy to page

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