chore(profile): towards exam table in profile data (WIP)

towards #2347
This commit is contained in:
Steffen Jost 2025-02-20 16:06:15 +01:00
parent 9a12e00f7f
commit bc63324ddf

View File

@ -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
<div>
^{modal "Beschreibung" (Right $ toWidget descr)}
|]
-- also see Handler.Utils.Widgets.companyWidget
companyCell :: IsDBTable m a => CompanyShorthand -> CompanyName -> Bool -> DBCell m a
companyCell csh cname isSupervisor = anchorCell curl name