diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-12-03 10:13:14 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-12-03 10:13:14 +0100 |
commit | 4a94c47e386e5818c2fe9f662277487da4c32ed7 (patch) | |
tree | 0c9e29dd4186ca19164915a909b36b9695fc53fc | |
parent | 0a3c1da70d2511d1dede37ee7d1c2ac84d0dc46e (diff) |
Improve the score table display some more by grouping score entries by exercise sheet.
-rw-r--r-- | src/logikorr/servlet.clj | 12 | ||||
-rw-r--r-- | war/style.css | 11 |
2 files changed, 19 insertions, 4 deletions
diff --git a/src/logikorr/servlet.clj b/src/logikorr/servlet.clj index 00440d4..37038a9 100644 --- a/src/logikorr/servlet.clj +++ b/src/logikorr/servlet.clj @@ -104,10 +104,14 @@ student] [:tr [:td (str id)] - [:td (map (fn [num] - (html [:span {:style "min-width: 2em; display: inline-block;"} num] - " ")) - score)] + [:td (mapcat (fn [nums] + (html + [:span.score-group {} + (map (fn [num] + (html [:span.score-entry num] + " ")) + nums)])) + (partition 4 4 [] score))] [:td last-name] [:td first-name]])) students)] diff --git a/war/style.css b/war/style.css index a7822e3..6830118 100644 --- a/war/style.css +++ b/war/style.css @@ -33,3 +33,14 @@ table.score-table { table.score-table td { padding: 5px 5px 5px 5px; } + +.score-group { + border: 1px solid gray; + padding: 2px 2px 2px 2px; + margin-left: 5px; margin-right: 5px; + background-color: #eee; +} +.score-entry { + min-width: 2em; + display: inline-block; +} |