+listKeywords db = do
+ list <- io $ listKeys db
+ standardQuery "List of keywords" $ do
+ table (do
+ tr $ th (text "Keyword")
+ mapM (\key -> tr $ td $ linkKey db key) list)
+ footer db ""
+
+linkKey db key = submitLink0 (showPage db key) (text key)
+
+revRow db key (id, date, author, comment) = tr $ do
+ td $ submitLink0 (showRev db key id) (text id)
+ td $ text date
+ td $ linkKey db author
+ td $ text comment
+
+showRev db key id = do
+ s <- io $ get db key id
+ standardQuery key $ do
+ case s of
+ Nothing -> text "No such revision"
+ Just s -> parseText s
+ p empty
+ submitLink0 (changeCurrent db key id) (text "Set this version as the current one")
+ footer db key
+changeCurrent db key id = do
+ b <- io $ setCurrent db key id
+ if b then showPage db key
+ else standardQuery key $ do
+ text "Could not set this revision as the current active one."
+ p empty
+ linkKey db key
+
+toWash [] = return ()
+toWash ((Paragraph):xs) = do