[Fencommits] fenserve: twid appearance
Benja Fallenstein
benja.fallenstein at gmail.com
Wed May 23 16:53:37 EEST 2007
Wed May 23 16:53:30 EEST 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* twid appearance
diff -rN -u old-fenserve/fendata/Main.hs new-fenserve/fendata/Main.hs
--- old-fenserve/fendata/Main.hs 2007-05-23 16:53:36.000000000 +0300
+++ new-fenserve/fendata/Main.hs 2007-05-23 16:53:36.000000000 +0300
@@ -388,7 +388,7 @@
commaList :: [String] -> String
commaList [] = ""
commaList [x] = x
-commaList xs = concat (intersperse ", " $ init xs) ++ ", and " ++ last xs
+commaList xs = concat (intersperse ", " $ init xs) ++ " and " ++ last xs
capitalize (c:cs) = toUpper c : cs
capitalize "" = ""
@@ -399,11 +399,11 @@
concatFor (Map.toList $ stateItems s) $ \(id, Item fields cats) ->
(++ "<p><form action='delItem' method=post>\
\<input type=hidden name=item value='"++show id++"'>\
- \<p><i>Categorized as " ++
+ \<a href='item/"++show id++"?returnTo=table'>[Edit item]</a> "++mdot++"\
+ \<button style='cursor: pointer; background: none; border: none; font: inherit; margin: 0; padding: 0'>[Delete item]</button> " ++ mdot ++
+ " <i>Categorized as " ++
commaList (map (("<b>"++).(++"</b>").capitalize) (Set.toList cats)) ++
- "</i> " ++ mdot ++ " \
- \<a href='item/"++show id++"?returnTo=table'>[Edit item]</a> "++mdot++"\
- \<button style='cursor: pointer; background: none; border: none; font: inherit; margin: 0; padding: 0'>[Delete item]</button></form><hr>")
+ "</i></form><hr>")
. ("<p>"++)
. concatFor (Map.toList fields) $ \(f:fs,v) ->
"<b>" ++ (toUpper f : fs) ++ ":</b> " ++ v ++ "<br>",
More information about the Fencommits
mailing list