summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/editdiff.pm2
-rw-r--r--templates/editpage.tmpl9
2 files changed, 10 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm
index d8f53a42e..015ce9c14 100644
--- a/IkiWiki/Plugin/editdiff.pm
+++ b/IkiWiki/Plugin/editdiff.pm
@@ -71,7 +71,7 @@ sub formbuilder_setup {
$content=~s/\r/\n/g;
my $diff = diff(srcfile($pagesources{$page}), $content);
- $form->tmpl_param("page_preview", $diff);
+ $form->tmpl_param("page_diff", $diff);
}
}
diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl
index 1e2d070ed..118ca4550 100644
--- a/templates/editpage.tmpl
+++ b/templates/editpage.tmpl
@@ -54,3 +54,12 @@
<TMPL_VAR PAGE_PREVIEW>
</div>
</TMPL_IF>
+<TMPL_IF NAME="PAGE_DIFF">
+<hr />
+<div class="header">
+<span>Diff:</span>
+</div>
+<div id="diff">
+<TMPL_VAR PAGE_DIFF>
+</div>
+</TMPL_IF>