[Tracker] [Pidgin] #13: "Last Edited by ..." fields on wiki

Pidgin trac at pidgin.im
Fri Nov 3 00:35:04 EST 2006


#13: "Last Edited by ..." fields on wiki
--------------------------+-------------------------------------------------
  Reporter:  elb          |       Owner:  datallah                   
      Type:  enhancement  |      Status:  closed                     
  Priority:  minor        |   Milestone:  Go public with Pidgin 2.0.0
 Component:  trac         |     Version:  2.0                        
Resolution:  fixed        |    Keywords:                             
--------------------------+-------------------------------------------------
Changes (by datallah):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 I did a little research (and talked to some folks in #trac) and this
 wasn't possible without patching trac.

 Fortunately, it was a easy patch to make:
 {{{
 Index: trac/wiki/web_ui.py
 ===================================================================
 --- trac/wiki/web_ui.py (revision 4128)
 +++ trac/wiki/web_ui.py (working copy)
 @@ -446,7 +446,9 @@
                  'page_html': wiki_to_html(page.text, self.env, req),
                  'history_href': req.href.wiki(page.name,
 action='history'),
                  'last_change_href': req.href.wiki(page.name,
 action='diff',
 -                                                  version=page.version)
 +                                                  version=page.version),
 +                'last_mod_author' : page.author,
 +                'last_mod_date' : format_datetime(page.time)
                  }
              if version:
                  req.hdf['wiki'] = {
 Index: templates/wiki.cs
 ===================================================================
 --- templates/wiki.cs   (revision 4128)
 +++ templates/wiki.cs   (working copy)
 @@ -388,4 +388,10 @@
   <?cs /if ?>
  </div>

 +<?cs if:wiki.exists && wiki.last_mod_date && wiki.last_mod_author ?>
 +<div>
 +  Last Modified on <?cs var:wiki.last_mod_date ?> by <?cs
 var:wiki.last_mod_author ?>.
 +</div>
 +<?cs /if ?>
 +
  <?cs include "footer.cs" ?>
 }}}

 Any formatting and layout suggestions are welcome.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/13#comment:1>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list