diff MoinMoin/action/info.py @ 1713:1f18d08ec3ba

better display of renamed pages on info/RC, show diff-link for deleted pages on RC
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 07 Jan 2007 11:25:09 +0100
parents 964fa7d0de32
children fc75423e26a8
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Sat Jan 06 21:18:05 2007 +0100
+++ b/MoinMoin/action/info.py	Sun Jan 07 11:25:09 2007 +0100
@@ -119,7 +119,7 @@
         for line in log.reverse():
             rev = int(line.rev)
             actions = []
-            if line.action in ['SAVE', 'SAVENEW', 'SAVE/REVERT', ]:
+            if line.action in ('SAVE', 'SAVENEW', 'SAVE/REVERT', 'SAVE/RENAME', ):
                 size = page.size(rev=rev)
                 if count == 0: # latest page
                     actions.append(render_action(_('view'), {'action': 'show'}))
@@ -135,8 +135,11 @@
                     lchecked = rchecked = ''
                 diff = '<input type="radio" name="rev1" value="%d"%s><input type="radio" name="rev2" value="%d"%s>' % (rev, lchecked, rev, rchecked)
                 comment = line.comment
-                if not comment and '/REVERT' in line.action:
+                if not comment:
+                    if '/REVERT' in line.action:
                         comment = _("Revert to revision %(rev)d.") % {'rev': int(line.extra)}
+                    elif '/RENAME' in line.action:
+                        comment = _("Renamed from '%(oldpagename)s'.") % {'oldpagename': line.extra}
             else: # ATT*
                 rev = '-'
                 diff = '-'