fradrive/templates/widgets/communication/recipientLayout.hamlet
2022-10-12 09:35:16 +02:00

48 lines
2.3 KiB
Plaintext

$newline never
$# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later
$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 RGCourseParticipantsInTutorial
_{MsgRGCourseParticipantsInTutorial}
$of RecipientGroup (RGTutorialParticipants tutid)
^{rgTutorialParticipantsCaption tutid}
$of RecipientGroup (RGExamRegistered eid)
^{rgExamRegisteredCaption eid}
$of RecipientGroup (RGSheetSubmittor sid)
^{rgSheetSubmittorCaption sid}
$of RecipientGroup RGCourseUnacceptedApplicants
_{MsgRGCourseUnacceptedApplicants}
$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}