This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
fradrive-old/templates/widgets/schedule/week.hamlet

39 lines
1.7 KiB
Plaintext

$newline never
<div uw-hide-columns="schedule-week">
<table .table .table--striped .table--hover .schedule>
<thead>
<tr .table__row .table__row--head>
<th .table__th uw-hide-column-header="time">
_{MsgScheduleTableHeadTime}
$forall (day, _, weekDayIdent) <- weekDays
<th .table__th uw-hide-column-header=#{weekDayIdent}>
^{formatTimeW SelFormatDate day}
<tbody>
$forall slot <- slotsToDisplay
<tr .table__row>
<td .table__td>
^{formatTimeSlotW slot}
$forall (day, _, _) <- weekDays
<td .table__td>
<div .table__td-content>
$maybe dayEvents <- Map.lookup day events
$maybe slotEvents <- Map.lookup slot dayEvents
$forall se@ScheduleEntry{seCourse=Entity _ Course{courseName},seType,seRoom,seOccurrence} <- slotEvents
<a href=@{scheduleEntryToHref se} .schedule--entry-link>
<div .schedule--entry>
#{CI.original courseName}: #
$case seType
$of SETCourseEvent{..}
#{CI.original setceType}
$of SETTutorial{..}
#{settName} #
(#{CI.original settType})
$of SETExamOccurrence{..}
#{seteoExamName} #
<br>
$maybe room <- seRoom
_{MsgScheduleRoom}: #{room} <br/>
^{formatOccurrenceW seOccurrence}