fradrive/templates/widgets/exam-occurrence-mapping.hamlet
2021-03-29 16:03:39 +02:00

53 lines
2.1 KiB
Plaintext

$newline never
<table .table .table--striped .table--hover>
<thead>
<tr .table__row .table__row--head>
<th .table__th colspan=2>
_{MsgExamRoomName}
<th .table__th colspan=2>
_{MsgExamRoomLoad}
$case occMappingRule
$of ExamRoomSurname
<th .table__th>
_{MsgExamRoomMappingSurname}
$of ExamRoomMatriculation
<th .table__th>
_{MsgExamRoomMappingMatriculation}
$of ExamRoomRandom
<th .table__th>
_{MsgExamRoomMappingRandom}
$of _
<th .table__td>
<th .table__th>
_{MsgExamRoom}
<th .table__th>
_{MsgExamRoomTime}
<th .table__th>
_{MsgExamRoomDescription}
<tbody>
$forall Entity occId ExamOccurrence{ examOccurrenceName, examOccurrenceRoom, examOccurrenceStart, examOccurrenceEnd, examOccurrenceDescription, examOccurrenceCapacity } <- occurrences
<tr .table__row>
<td .table__td :isIgnored occId:.occurrence--ignored>
$maybe ignoreRoomWgt' <- Map.lookup occId ignoreRoomWgt
^{ignoreRoomWgt'}
<td .table__td :isIgnored occId:.occurrence--ignored>
_{examOccurrenceName}
<td .table__td :isIgnored occId:.occurrence--ignored>
_{loadProp (occLoad occId) examOccurrenceCapacity}
<td .table__td :isIgnored occId:.occurrence--ignored>
$maybe nudgeWgt' <- Map.lookup occId nudgeWgt
^{nudgeWgt'}
<td .table__td :isIgnored occId:.occurrence--ignored>
$maybe mappingWgt <- occMapping occId
^{mappingWgt}
<td .table__td :isIgnored occId:.occurrence--ignored>
$maybe room <- examOccurrenceRoom
^{roomReferenceWidget room}
$nothing
_{MsgExamOccurrenceRoomIsUnset}
<td .table__td :isIgnored occId:.occurrence--ignored>
^{formatTimeRangeW SelFormatDateTime examOccurrenceStart examOccurrenceEnd}
<td .table__td :isIgnored occId:.occurrence--ignored>
$maybe desc <- examOccurrenceDescription
#{desc}