feat(course-teaser): hide lecturer entry if empty

This commit is contained in:
Sarah Vaupel 2019-08-09 16:35:03 +02:00
parent c2c12b9643
commit f7fb3c1219
2 changed files with 9 additions and 8 deletions

View File

@ -158,7 +158,7 @@ makeCourseTable whereClause colChoices psValidator = do
, Just $ prismAForm (singletonFilter "schoolshort" . maybePrism (_PathPiece . from _SchoolId)) mPrev $ aopt (hoistField lift schoolField) (fslI MsgCourseSchool)
, Just $ prismAForm (singletonFilter "lecturer") mPrev $ aopt textField (fslI MsgCourseLecturer)
, Just $ prismAForm (singletonFilter "search") mPrev $ aopt textField (fslI MsgCourseFilterSearch)
, Just $ prismAForm (singletonFilter "openregistration" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgCourseRegisterOpen)
, Just $ prismAForm (singletonFilter "openregistration" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgCourseRegisterOpen) -- TODO: checkbox instead of boolField
, muid $> prismAForm (singletonFilter "registered" . maybePrism _PathPiece) mPrev (aopt boolField (fslI MsgCourseFilterRegistered))
]
, dbtStyle = def

View File

@ -9,13 +9,14 @@
_{courseName}
$if isRegistered
<div .course-teaser__registration>_{MsgRegistered}
<div .course-teaser__lecturer-label>
_{MsgLecturersForN (length courseLecturers)}
<div .course-teaser__lecturer-value>
<ul .list--inline .list--comma-separated>
$forall lecturer <- courseLecturers
<li>
#{lecturer}
$if not $ null courseLecturers
<div .course-teaser__lecturer-label>
_{MsgLecturersForN (length courseLecturers)}
<div .course-teaser__lecturer-value>
<ul .list--inline .list--comma-separated>
$forall lecturer <- courseLecturers
<li>
#{lecturer}
$maybe regTo <- courseRegisterTo
<div .course-teaser__duedate-label>_{MsgRegisterTo}
<div .course-teaser__duedate-value>^{formatTimeW SelFormatDateTime regTo}