feat(course-events): add HideColumns for course events

This commit is contained in:
Sarah Vaupel 2020-03-31 14:56:31 +02:00
parent c8904d10b6
commit 1138f9e327

View File

@ -203,53 +203,55 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
$if null events
\ #{iconInvisible}
<dd .deflist__dd>
<div .scrolltable .scrolltable--bordered>
<table .table .table--striped .table--hover>
<thead>
<tr .table__row .table__row--head>
<th .table__th>
_{MsgCourseEventType}
<th .table__th>
_{MsgCourseEventTime}
<th .table__th>
_{MsgCourseEventRoom}
<th .table__th>
_{MsgCourseEventNote}
$if mayCreateEvents
<th .table__th>
_{MsgCourseEventActions}
\ #{iconInvisible}
<tbody>
$forall (cID, CourseEvent{courseEventType, courseEventTime, courseEventRoom, courseEventNote}) <- events
<tr .table__row ##{"event-" <> toPathPiece cID}>
<td .table__td>
<div .table__td-content>
#{courseEventType}
<td .table__td>
<div .table__td-content>
^{occurrencesWidget courseEventTime}
<td .table__td>
<div .table__td-content>
#{courseEventRoom}
<td .table__td>
<div .table__td-content>
#{courseEventNote}
<div uw-hide-columns="events">
<div .scrolltable .scrolltable--bordered>
<table .table .table--striped .table--hover>
<thead>
<tr .table__row .table__row--head>
<th .table__th uw-hide-column-header="type">
_{MsgCourseEventType}
<th .table__th uw-hide-column-header="time">
_{MsgCourseEventTime}
<th .table__th uw-hide-column-header="room">
_{MsgCourseEventRoom}
<th .table__th uw-hide-column-header="note">
_{MsgCourseEventNote}
$if mayCreateEvents
<th .table__th uw-hide-column-header="actions">
_{MsgCourseEventActions}
\ #{iconInvisible}
<tbody>
$forall (cID, CourseEvent{courseEventType, courseEventTime, courseEventRoom, courseEventNote}) <- events
<tr .table__row ##{"event-" <> toPathPiece cID}>
<td .table__td>
<ul .list--inline .list--iconless .list--comma-separated>
<li>
^{modal (i18n MsgCourseEventsActionEdit) (Left (SomeRoute (CEventR tid ssh csh cID CEvEditR)))}
<li>
^{modal (i18n MsgCourseEventsActionDelete) (Left (SomeRoute (CEventR tid ssh csh cID CEvDeleteR)))}
$if mayCreateEvents
<tfoot>
<tr .table__row .table__row--foot>
<td>
<td>
<td>
<td .table__td>
<div .table__td-content>
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))}
<div .table__td-content>
#{courseEventType}
<td .table__td>
<div .table__td-content>
^{occurrencesWidget courseEventTime}
<td .table__td>
<div .table__td-content>
#{courseEventRoom}
<td .table__td>
<div .table__td-content>
#{courseEventNote}
$if mayCreateEvents
<td .table__td>
<ul .list--inline .list--iconless .list--comma-separated>
<li>
^{modal (i18n MsgCourseEventsActionEdit) (Left (SomeRoute (CEventR tid ssh csh cID CEvEditR)))}
<li>
^{modal (i18n MsgCourseEventsActionDelete) (Left (SomeRoute (CEventR tid ssh csh cID CEvDeleteR)))}
$if mayCreateEvents
<tfoot>
<tr .table__row .table__row--foot>
<td>
<td>
<td>
<td>
<td .table__td>
<div .table__td-content>
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))}
$if hasTutorials