fradrive/templates/allocation/show.hamlet

68 lines
2.1 KiB
Plaintext

$newline never
<section>
$# <h2>
$# _{MsgAllocationData}
<dl .deflist>
$maybe desc <- allocationDescription
<dt .deflist__dt>
_{MsgAllocationDescription}
<dd .deflist__dd>
#{desc}
$maybe fromT <- allocationStaffRegisterFrom
<dt .deflist__dt>
$maybe _ <- allocationStaffRegisterTo
_{MsgAllocationStaffRegister}
$nothing
_{MsgAllocationStaffRegisterFrom}
<dd .deflist__dd>
^{formatTimeRangeW SelFormatDateTime fromT allocationStaffRegisterTo}
$maybe fromT <- allocationRegisterFrom
<dt .deflist__dt>
$maybe _ <- allocationRegisterTo
_{MsgAllocationRegister}
$nothing
_{MsgAllocationRegisterFrom}
<dd .deflist__dd>
^{formatTimeRangeW SelFormatDateTime fromT allocationRegisterTo}
$if staffInformation
$maybe fromT <- allocationStaffAllocationFrom
<dt .deflist__dt>
$maybe _ <- allocationStaffAllocationTo
_{MsgAllocationStaffAllocation}
$nothing
_{MsgAllocationStaffAllocationFrom}
<dd .deflist__dd>
^{formatTimeRangeW SelFormatDateTime fromT allocationStaffAllocationTo}
$if is _Just muid
$if mayRegister || is _Just registration
<section id=allocation-participation>
<h2>
_{MsgAllocationParticipation}
$if mayRegister
^{registerForm'}
$else
$maybe Entity _ AllocationUser{allocationUserTotalCourses} <- registration
<dl .deflist>
<dt .deflist__dt>
_{MsgAllocationTotalCourses}
<dd .deflist__dd>
#{allocationUserTotalCourses}
$else
<section id=allocation-participation>
<h2>
_{MsgAllocationParticipation}
<p>
_{MsgAllocationParticipationLoginFirst}
$if not (null courseWidgets)
<section .allocation>
<h2>
_{MsgAllocationCourses}
<div .allocation__explanation .allocation__label>
<p>_{MsgAllocationPriorityTip}
<p>_{MsgAllocationPriorityRelative}
<div .allocation__courses>
$forall courseWgt <- courseWidgets
^{courseWgt}