[Fencommits] fenserve: make 'main' on non-root item pages a link to the root page
Benja Fallenstein
benja.fallenstein at gmail.com
Sat Apr 28 22:01:12 EEST 2007
Sat Apr 28 22:00:26 EEST 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* make 'main' on non-root item pages a link to the root page
diff -rN -u old-fenserve/notetaker/Main.hs new-fenserve/notetaker/Main.hs
--- old-fenserve/notetaker/Main.hs 2007-04-28 22:01:12.000000000 +0300
+++ new-fenserve/notetaker/Main.hs 2007-04-28 22:01:12.000000000 +0300
@@ -42,10 +42,11 @@
page path nick = do
(lines :: [Line]) <- get
+ let v = if path == [] then 0 else -1
case getPath path $ executeAll lines of
Just (Note title _ notes) ->
respond $ style ++ "<h2>" ++ renderPath path ++ " " ++ title ++ "</h2>"
- ++ renderNotes path nick notes ++ views 0 nick ++ form nick
+ ++ renderNotes path nick notes ++ views v nick ++ form nick
Nothing -> respond $ "Path not found: " ++ renderPath path
getPath [] note = Just note
More information about the Fencommits
mailing list