- submitLink0 (editPage db key) (text "Edit this page")
- text " Keyword: "
- activate (sp db) textInputField empty
- --address (hlink (URL {unURL = ("wiki?"++key++"+edit")}) (text "Edit this page")
+ table $ tr $ do
+ td $ submitLink0 (editPage db key) (text "Edit this keyword")
+ td $ submitLink0 (listRevs db key) (text "List old versions")
+ td $ text "Keyword: "
+ td $ activate (showPage db) textInputField empty
+
+listRevs db key = do
+ list <- io $ getList db key
+ standardQuery key $ table $ do
+ tr $ mapM (\header -> th (text header))
+ ["Id", "Date", "Author", "Comment"]
+ mapM (revRow db key) list
+
+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