feat(course-events): hide note column if there are no notes to display
This commit is contained in:
parent
1138f9e327
commit
1ac7f4e881
@ -831,6 +831,9 @@ th, td
|
|||||||
font-style: normal
|
font-style: normal
|
||||||
color: var(--color-font)
|
color: var(--color-font)
|
||||||
|
|
||||||
|
.course-event-note--hidden
|
||||||
|
display: none
|
||||||
|
|
||||||
.bound_explanation
|
.bound_explanation
|
||||||
color: var(--color-fontsec)
|
color: var(--color-fontsec)
|
||||||
font-style: italic
|
font-style: italic
|
||||||
|
|||||||
@ -198,6 +198,7 @@ getCShowR tid ssh csh = do
|
|||||||
, length fs <= 3
|
, length fs <= 3
|
||||||
, all (notElem pathSeparator . view _2) fs
|
, all (notElem pathSeparator . view _2) fs
|
||||||
]
|
]
|
||||||
|
hiddenEventNotes = all (\(_,CourseEvent{..}) -> is _Nothing courseEventNote) events
|
||||||
mayCreateNews <- hasWriteAccessTo $ CourseR tid ssh csh CNewsNewR
|
mayCreateNews <- hasWriteAccessTo $ CourseR tid ssh csh CNewsNewR
|
||||||
mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR
|
mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR
|
||||||
|
|
||||||
|
|||||||
@ -214,7 +214,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
|||||||
_{MsgCourseEventTime}
|
_{MsgCourseEventTime}
|
||||||
<th .table__th uw-hide-column-header="room">
|
<th .table__th uw-hide-column-header="room">
|
||||||
_{MsgCourseEventRoom}
|
_{MsgCourseEventRoom}
|
||||||
<th .table__th uw-hide-column-header="note">
|
<th .table__th uw-hide-column-header="note" :hiddenEventNotes:.course-event-note--hidden>
|
||||||
_{MsgCourseEventNote}
|
_{MsgCourseEventNote}
|
||||||
$if mayCreateEvents
|
$if mayCreateEvents
|
||||||
<th .table__th uw-hide-column-header="actions">
|
<th .table__th uw-hide-column-header="actions">
|
||||||
@ -232,7 +232,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
|||||||
<td .table__td>
|
<td .table__td>
|
||||||
<div .table__td-content>
|
<div .table__td-content>
|
||||||
#{courseEventRoom}
|
#{courseEventRoom}
|
||||||
<td .table__td>
|
<td .table__td :hiddenEventNotes:.course-event-note--hidden>
|
||||||
<div .table__td-content>
|
<div .table__td-content>
|
||||||
#{courseEventNote}
|
#{courseEventNote}
|
||||||
$if mayCreateEvents
|
$if mayCreateEvents
|
||||||
@ -248,7 +248,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
|||||||
<td>
|
<td>
|
||||||
<td>
|
<td>
|
||||||
<td>
|
<td>
|
||||||
<td>
|
<td :hiddenEventNotes:.course-event-note--hidden>
|
||||||
<td .table__td>
|
<td .table__td>
|
||||||
<div .table__td-content>
|
<div .table__td-content>
|
||||||
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))}
|
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))}
|
||||||
|
|||||||
Reference in New Issue
Block a user