[Fencommits] fenserve: twiddle appearance
Benja Fallenstein
benja.fallenstein at gmail.com
Wed May 23 15:17:52 EEST 2007
Wed May 23 15:17:44 EEST 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* twiddle appearance
diff -rN -u old-fenserve/fendata/Main.hs new-fenserve/fendata/Main.hs
--- old-fenserve/fendata/Main.hs 2007-05-23 15:17:52.000000000 +0300
+++ new-fenserve/fendata/Main.hs 2007-05-23 15:17:52.000000000 +0300
@@ -390,15 +390,16 @@
showTable () s = (
(new++) . ("<hr>"++) . (++new) .
concatFor (Map.toList $ stateItems s) $ \(id, Item fields _) ->
- (("<p><a href='item/"++show id++"'>[edit]</a><br>")++)
- . (++"<form action='delItem' method=post>\
+ (++ "<p><form action='delItem' method=post>\
\<input type=hidden name=item value='"++show id++"'>\
- \<input type=submit value='Delete item'></form><hr>")
+ \<a href='item/"++show id++"'>[Edit item]</a>\
+ \<span style='margin-left: 0.7em; margin-right: 0.4em; font-weight: bold'>·</span>\
+ \<button style='background: none; border: none; font: inherit; margin: 0; padding: 0'>[Delete item]</button></form><hr>") . ("<p>"++)
. concatFor (Map.toList fields) $ \(f:fs,v) ->
"<b>" ++ (toUpper f : fs) ++ ":</b> " ++ v ++ "<br>",
s) where new = concatFor (Map.keys $ stateSchema s) $ \cat ->
"<form action='newItem' method=post>\
- \<input type=submit name=action value='New "++cat++"'></form>"
+ \<button type=submit>New "++cat++"</button></form>"
showItem :: String -> () -> MyState -> (String, MyState)
showItem item () s = let Item fields cats = stateItems s Map.! read item in (
More information about the Fencommits
mailing list