diff --git a/src/Handler/Utils/Table/Cells.hs b/src/Handler/Utils/Table/Cells.hs index 3e6ff7337..f49bffbe5 100644 --- a/src/Handler/Utils/Table/Cells.hs +++ b/src/Handler/Utils/Table/Cells.hs @@ -400,6 +400,19 @@ examOccurrenceCell Entity{entityVal = ExamOccurrence{..}} = wgtCell [whamlet|#{examOccurrenceName}:^{formatTimeRangeW SelFormatDateTime examOccurrenceStart examOccurrenceEnd}|] +examCell :: IsDBTable m a => Course -> Exam -> DBCell m a +examCell Course{..} Exam{..} = anchorCell link name `mappend` desc + where + link = CExamR courseTerm courseSchool courseShorthand examName EShowR + name = citext2widget examName + desc = case examDescription of + Nothing -> mempty + (Just descr) -> cell [whamlet| + $newline never +