From 56c2fccb84ff71163ccc22291cf42c0cea88b2de Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Thu, 25 Jul 2019 07:48:12 +0200 Subject: [PATCH] feat(corrections assignment): add convenience to table header links look ugly in table headers so as a workaround we use an icon instead for a much needed link in the corrections assignment table --- src/Utils/Icon.hs | 2 ++ templates/corrections-overview.hamlet | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index 4d9dd168d..a5d0c8a92 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -45,6 +45,7 @@ data Icon | IconExamRegisterFalse | IconCommentTrue | IconCommentFalse + | IconLink | IconFileDownload | IconFileZip | IconFileCSV @@ -71,6 +72,7 @@ iconText = \case IconExamRegisterFalse -> "calendar-times" IconCommentTrue -> "comment-alt" IconCommentFalse -> "comment-slash" -- comment-alt-slash is not available for free + IconLink -> "link" IconFileDownload -> "file-download" IconFileZip -> "file-archive" IconFileCSV -> "file-csv" diff --git a/templates/corrections-overview.hamlet b/templates/corrections-overview.hamlet index 64a647387..747f99d15 100644 --- a/templates/corrections-overview.hamlet +++ b/templates/corrections-overview.hamlet @@ -56,8 +56,10 @@ $# Always iterate over orderedSheetNames for consistent sorting! Newest first, except in this table $forall shn <- orderedSheetNames - #{shn} - $# ^{simpleLinkI (SomeMessage MsgMenuCorrectors) (CSheetR tid ssh csh shn SCorrR)} + + $# Links currently look ugly in table headers; used an icon as a workaround: + ^{simpleLink (toWidget iconLink) (CSheetR tid ssh csh shn SShowR)} + #{shn} _{MsgNrSubmissionsTotal} _{MsgNrSubmissionsNotCorrected}