diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-06 14:59:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-06 15:00:48 -0400 |
commit | d4fd8cd67dd868ed8b0d51c2d710b834d6a33b05 (patch) | |
tree | f1c6e01b37475be73a43c15e99091ae92e65c24b | |
parent | 7988a5aee3be9fe82da1d47d2a72c95eabc7bb6e (diff) |
put diff at end of revert form
-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> |