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/communication/recipientLayout.hamlet

41 lines
2.0 KiB
Plaintext

$newline never
$if not (null activeCategories)
<div .recipient-categories>
$forall category <- activeCategories
<div .recipient-category>
<input type=checkbox id=#{checkedIdent category} .recipient-category__checkbox :elem category checkedCategories:checked>
<label .recipient-category__label for=#{checkedIdent category}>
$case category
$of RecipientCustom
_{MsgRecipientCustom}
$of RecipientGroup RGCourseParticipants
_{MsgRGCourseParticipants}
$of RecipientGroup RGCourseLecturers
_{MsgRGCourseLecturers}
$of RecipientGroup RGCourseCorrectors
_{MsgRGCourseCorrectors}
$of RecipientGroup RGCourseTutors
_{MsgRGCourseTutors}
$of RecipientGroup (RGTutorialParticipants tutid)
^{rgTutorialParticipantsCaption tutid}
$of RecipientGroup RGCourseUnacceptedApplicants
_{MsgRGCourseUnacceptedApplicants}
$of RecipientGroup (RGExamRegistered eid)
^{rgExamRegisteredCaption eid}
$of RecipientGroup (RGSheetSubmittor sid)
^{rgSheetSubmittorCaption sid}
$if hasContent category
<fieldset .recipient-category__fieldset uw-interactive-fieldset .interactive-fieldset__target data-conditional-input=#{checkedIdent category}>
$if not (null (categoryIndices category))
<div .recipient-category__checked-counter>
<div .recipient-category__toggle-all>
<input type=checkbox id=#{checkedIdent category}-toggle-all>
<label for=#{checkedIdent category}-toggle-all .recipient-category__option-label>_{MsgRecipientToggleAll}
<div .recipient-category__options>
$forall optIx <- categoryIndices category
^{cellWdgts ! optIx}
$maybe addWdgt <- addWdgts !? (1, (BoundedPosition category, 0))
^{addWdgt}