shithub: werc

Download patch

ref: d6c51f8b33458c6142b7cee1f475a1f38ce5ec1e
parent: 9212f4b6fd7b70d0b444c00b12322e975bbf43b0
author: uriel <uriel@engel.se.cat-v.org>
date: Tue Oct 21 12:37:43 EDT 2008

Add optional wiki sidebar

--- a/lib/default_master.tpl
+++ b/lib/default_master.tpl
@@ -17,11 +17,24 @@
 <div id="side-bar">
 
 <div>
-% if (! ~ $#sideBarNavTitle 0) {
-%     echo '<p class="sideBarTitle">'$"sideBarNavTitle':</p>'
-% }
-% gensidebar
+%{
+if (! ~ $#sideBarNavTitle 0)
+    echo '<p class="sideBarTitle">'$"sideBarNavTitle':</p>'
+
+gensidebar
+
+%}
 </div>
+
+% # TODO: probably should check if we have the right perms
+% if (! ~ $#wiki 0 && test -f $body.md  && get_user && ! ~ $#logged_user 0) {
+<div> 
+    <form action="/_apps/dirdir/edit" method="POST">
+        <input type="hidden" name="edit_wiki_page" value="%($req_path%)" />
+        <input type="submit" name="" value="Edit page" />
+    </form>
+</div>
+% }
 
 <div>
 </div>