diff options
-rw-r--r-- | IkiWiki/Plugin/recentchanges.pm | 3 | ||||
-rw-r--r-- | 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 @@ -<pre> -<TMPL_VAR patch_contents> -</pre> <TMPL_VAR FORM-START> <div> <TMPL_VAR FIELD-DO> @@ -8,7 +5,15 @@ <TMPL_VAR FIELD-REV> </div> <div class="revert buttons"> - <TMPL_VAR form-submit> - <TMPL_VAR form-cancel> +<TMPL_VAR form-submit> +<TMPL_VAR form-cancel> </div> <TMPL_VAR FORM-END> +<br \> +<div class="header"> +<span>Diff being reverted:</span> +</div> +<div id="diff"> +<pre> +<TMPL_VAR diff> +</pre> |