fradrive/templates/table/course/course-teaser.hamlet
Steffen Jost 754d6caa1b fix(course list): show complete registration span
show regFrom to regTo, as requested by user feedback, or link to
allocation

Closes #446
2019-08-22 16:41:26 +02:00

33 lines
1.5 KiB
Plaintext

<div uw-course-teaser :isRegistered:.course-teaser__registered :is _Nothing courseDescription:.course-teaser__disabled :is _Just courseDescription:tabindex="1">
<div .course-teaser__semester>
<a href=@{TermCourseListR courseTerm}>_{courseSemester}
<div .course-teaser__school-value>
<a href=@{TermSchoolCourseListR courseTerm courseSchool}>_{courseSchoolName}
<div .course-teaser__shorthand>_{courseShorthand}
<div .course-teaser__title>
<a href=@{CourseR courseTerm courseSchool courseShorthand CShowR}>
_{courseName}
$if isRegistered
<div .course-teaser__registration>_{MsgRegistered}
$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 Entity _ Allocation{allocationTerm, allocationSchool, allocationShorthand, allocationName} <- courseAllocation
<div .course-teaser__duedate-label>_{MsgRegistration}
<div .course-teaser__duedate-value>
<a href=@{AllocationR allocationTerm allocationSchool allocationShorthand AShowR}>
#{allocationName}
$nothing
$maybe regFrom <- courseRegisterFrom
<div .course-teaser__duedate-label>_{MsgRegistration}
<div .course-teaser__duedate-value>^{formatTimeRangeW SelFormatDateTime regFrom courseRegisterTo}
$maybe desc <- courseDescription
<div .course-teaser__chevron>
<div .course-teaser__description>#{desc}