diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-02-18 09:33:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-02-18 11:52:18 -0600 |
commit | 1ffb8c7688a3ecc947c81bccbd406f277c9d853a (patch) | |
tree | 985ec17b783bfbd10fa1557bac9b5ff8797a09fa /root | |
parent | 0d5a97a87d1e42626f8e21b36ef327afd556865c (diff) | |
download | narwhal-1ffb8c7688a3ecc947c81bccbd406f277c9d853a.tar.gz narwhal-1ffb8c7688a3ecc947c81bccbd406f277c9d853a.zip |
clean up the templates a bit
Diffstat (limited to 'root')
-rw-r--r-- | root/templates/edit.tt | 8 | ||||
-rw-r--r-- | root/templates/history.tt | 12 | ||||
-rw-r--r-- | root/templates/page.tt | 10 | ||||
-rw-r--r-- | root/templates/wrappers/root.tt | 6 |
4 files changed, 15 insertions, 21 deletions
diff --git a/root/templates/edit.tt b/root/templates/edit.tt index a2be77c..4b5c811 100644 --- a/root/templates/edit.tt +++ b/root/templates/edit.tt @@ -1,12 +1,8 @@ -<html> -<body> -<h1>[% page %]</h1> +[% WRAPPER 'wrappers/root.tt' %] <p><a href="[% uri_for('action', 'page', 'page_name', page) %]">View</a></p> -<p> <form method="POST" action="[% uri_for('action', 'edit', 'page_name', page) %]"> <textarea name="text" rows="10" cols="30">[% text %]</textarea> <input type="submit" value="Submit" /> </form> </p> -</body> -</html> +[% END %] diff --git a/root/templates/history.tt b/root/templates/history.tt index a50839b..1393b7e 100644 --- a/root/templates/history.tt +++ b/root/templates/history.tt @@ -1,7 +1,5 @@ -<html> -<body> -<h1>[% page %]</h1> -<p><a href="[% uri_for('action', 'page', 'page_name', page) %]">View</a></p> +[% WRAPPER 'wrappers/root.tt' %] +<p><a href="[% uri_for('action', 'page', 'page_name', page) %]">View Current</a></p> <ul> [% SET cur = head %] [% WHILE cur %] @@ -9,8 +7,4 @@ [% SET cur = cur.previous_revision %] [% END %] </ul> -<p style="font-size: small"> -Last modified by [% author.id %] on [% modified %] -</p> -</body> -</html> +[% END %] diff --git a/root/templates/page.tt b/root/templates/page.tt index 754d4b7..69d5213 100644 --- a/root/templates/page.tt +++ b/root/templates/page.tt @@ -1,17 +1,15 @@ -<html> -<body> -<h1>[% page %]</h1> +[% WRAPPER 'wrappers/root.tt' %] [% IF historical %] <p>This is a historical view of this page</p> +<p><a href="[% uri_for('action', 'page', 'page_name', page) %]">View Current</a></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><a href="[% uri_for('action', 'history', 'page_name', page) %]">Page History</a></p> <p> [% text %] </p> <p style="font-size: small"> Last modified by [% author.id %] on [% modified %] </p> -</body> -</html> +[% END %] diff --git a/root/templates/wrappers/root.tt b/root/templates/wrappers/root.tt new file mode 100644 index 0000000..de07514 --- /dev/null +++ b/root/templates/wrappers/root.tt @@ -0,0 +1,6 @@ +<html> +<body> +<h1>[% page %]</h1> +[% content %] +</body> +</html> |