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 $if null events
\ #{iconInvisible} \ #{iconInvisible}
<dd .deflist__dd> <dd .deflist__dd>
<div .scrolltable .scrolltable--bordered> <div uw-hide-columns="events">
<table .table .table--striped .table--hover> <div .scrolltable .scrolltable--bordered>
<thead> <table .table .table--striped .table--hover>
<tr .table__row .table__row--head> <thead>
<th .table__th> <tr .table__row .table__row--head>
_{MsgCourseEventType} <th .table__th uw-hide-column-header="type">
<th .table__th> _{MsgCourseEventType}
_{MsgCourseEventTime} <th .table__th uw-hide-column-header="time">
<th .table__th> _{MsgCourseEventTime}
_{MsgCourseEventRoom} <th .table__th uw-hide-column-header="room">
<th .table__th> _{MsgCourseEventRoom}
_{MsgCourseEventNote} <th .table__th uw-hide-column-header="note">
$if mayCreateEvents _{MsgCourseEventNote}
<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}
$if mayCreateEvents $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> <td .table__td>
<ul .list--inline .list--iconless .list--comma-separated> <div .table__td-content>
<li> #{courseEventType}
^{modal (i18n MsgCourseEventsActionEdit) (Left (SomeRoute (CEventR tid ssh csh cID CEvEditR)))} <td .table__td>
<li> <div .table__td-content>
^{modal (i18n MsgCourseEventsActionDelete) (Left (SomeRoute (CEventR tid ssh csh cID CEvDeleteR)))} ^{occurrencesWidget courseEventTime}
$if mayCreateEvents <td .table__td>
<tfoot> <div .table__td-content>
<tr .table__row .table__row--foot> #{courseEventRoom}
<td> <td .table__td>
<td> <div .table__td-content>
<td> #{courseEventNote}
<td .table__td> $if mayCreateEvents
<div .table__td-content> <td .table__td>
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))} <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 $if hasTutorials