changeset 3361:8fca4e0c0de5

action.diff: added a revert button
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Mar 2008 18:43:36 +0100
parents b5b49ff88d0c
children 3b5cb4f28020 e58d480044c2
files MoinMoin/action/diff.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/diff.py	Thu Mar 20 18:00:37 2008 +0100
+++ b/MoinMoin/action/diff.py	Thu Mar 20 18:43:36 2008 +0100
@@ -137,6 +137,13 @@
  </td>
  <td style="border:0">
   <span class="diff-header">%s</span>
+  <span style="text-align:center">
+   <form action="%s" method="get">
+    <input name="action" value="revert" type="hidden">
+    <input name="rev" value="%d" type="hidden">
+    <input value="%s" type="submit"%s>
+   </form>
+  </span>
  </td>
  <td style="border:0">
   <span style="text-align:right">
@@ -152,6 +159,7 @@
 </table>
 """ % (page_url, oldrev - 1, oldrev, _("Previous change"), disable_prev,
        title,
+       page_url, oldrev, _("Revert to this revision"), u'',
        page_url, newrev, newrev + 1, _("Next change"), disable_next, )
 
     request.write(f.rawHTML(navigation_html))