From d4fd8cd67dd868ed8b0d51c2d710b834d6a33b05 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Oct 2010 14:59:20 -0400 Subject: put diff at end of revert form --- IkiWiki/Plugin/recentchanges.pm | 3 +-- templates/revert.tmpl | 15 ++++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 948bb1366..4cd910667 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -117,8 +117,7 @@ sub sessioncgi ($$) { } else { $form->title(sprintf(gettext("confirm reversion of %s"), $rev)); - my $patch_contents = IkiWiki::rcs_diff($rev); - $form->tmpl_param(patch_contents => encode_entities($patch_contents)); + $form->tmpl_param(diff => encode_entities(scalar IkiWiki::rcs_diff($rev))); $form->field(name => "rev", type => "hidden", value => $rev, force => 1); IkiWiki::showform($form, $buttons, $session, $q); exit 0; diff --git a/templates/revert.tmpl b/templates/revert.tmpl index 03cd0838d..6289bea6b 100644 --- a/templates/revert.tmpl +++ b/templates/revert.tmpl @@ -1,6 +1,3 @@ -
-
-
@@ -8,7 +5,15 @@
- - + +
+
+
+Diff being reverted: +
+
+
+
+
-- cgit v1.2.3