diff --git a/frontend/src/app.sass b/frontend/src/app.sass index c1f05706c..265d516b2 100644 --- a/frontend/src/app.sass +++ b/frontend/src/app.sass @@ -831,6 +831,9 @@ th, td font-style: normal color: var(--color-font) +.course-event-note--hidden + display: none + .bound_explanation color: var(--color-fontsec) font-style: italic diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 1c8a6cca4..e419b3cce 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -198,6 +198,7 @@ getCShowR tid ssh csh = do , length fs <= 3 , all (notElem pathSeparator . view _2) fs ] + hiddenEventNotes = all (\(_,CourseEvent{..}) -> is _Nothing courseEventNote) events mayCreateNews <- hasWriteAccessTo $ CourseR tid ssh csh CNewsNewR mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR diff --git a/templates/course.hamlet b/templates/course.hamlet index a41c11ded..6aee55dc5 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -214,7 +214,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course) _{MsgCourseEventTime} _{MsgCourseEventRoom} - + _{MsgCourseEventNote} $if mayCreateEvents @@ -232,7 +232,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
#{courseEventRoom} - +
#{courseEventNote} $if mayCreateEvents @@ -248,7 +248,7 @@ $# $if NTop (Just 0) < NTop (courseCapacity course) - +
^{modal (i18n MsgCourseEventsActionCreate) (Left (SomeRoute (CourseR tid ssh csh CEventsNewR)))}