summaryrefslogtreecommitdiffstats
path: root/root
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-18 00:12:12 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-18 00:12:12 -0600
commit4875037269702e9e4195d01e2711b489c40ad0e9 (patch)
tree1f73708fa2b2cf8a6241ced5891749f846da8a67 /root
parent85de4ab2e5114c343cac8abd89a796d1bb48153a (diff)
downloadnarwhal-4875037269702e9e4195d01e2711b489c40ad0e9.tar.gz
narwhal-4875037269702e9e4195d01e2711b489c40ad0e9.zip
allow viewing page history
Diffstat (limited to 'root')
-rw-r--r--root/templates/history.tt16
-rw-r--r--root/templates/page.tt5
2 files changed, 21 insertions, 0 deletions
diff --git a/root/templates/history.tt b/root/templates/history.tt
new file mode 100644
index 0000000..a50839b
--- /dev/null
+++ b/root/templates/history.tt
@@ -0,0 +1,16 @@
+<html>
+<body>
+<h1>[% page %]</h1>
+<p><a href="[% uri_for('action', 'page', 'page_name', page) %]">View</a></p>
+<ul>
+[% SET cur = head %]
+[% WHILE cur %]
+<li><a href="[% uri_for('action', 'old_page', 'page_name', page, 'rev', cur.digest) %]">[% cur.author.id %] on [% cur.modification_date %]</a></li>
+[% SET cur = cur.previous_revision %]
+[% END %]
+</ul>
+<p style="font-size: small">
+Last modified by [% author.id %] on [% modified %]
+</p>
+</body>
+</html>
diff --git a/root/templates/page.tt b/root/templates/page.tt
index 6e9ec31..754d4b7 100644
--- a/root/templates/page.tt
+++ b/root/templates/page.tt
@@ -1,7 +1,12 @@
<html>
<body>
<h1>[% page %]</h1>
+[% IF historical %]
+<p>This is a historical view of this page</p>
+[% ELSE %]
<p><a href="[% uri_for('action', 'edit', 'page_name', page) %]">Edit</a></p>
+[% END %]
+<p><a href="[% uri_for('action', 'history', 'page_name', page) %]">History</a></p>
<p>
[% text %]
</p>