diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index 2c2690b23..99c242802 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -40,11 +40,11 @@ colCourseDescr = sortable (Just "course") (i18nCell MsgCourse) $ do return $ courseCell course colDescription :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a) -colDescription = sortable Nothing (i18nCell MsgCourseDescription) +colDescription = sortable Nothing mempty $ \DBRow{ dbrOutput=(Entity _ Course{..}, _, _, _) } -> case courseDescription of Nothing -> mempty - (Just descr) -> cell $ modal "Beschreibung" (Right $ toWidget descr) + (Just descr) -> cell $ modal (commentWidget True) (Right $ toWidget descr) colCShort :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a) colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort) @@ -190,7 +190,8 @@ getCourseListR :: Handler Html getCourseListR = do muid <- maybeAuthId let colonnade = widgetColonnade $ mconcat - [ colCourseDescr + [ colCourse -- colCourseDescr + , colDescription , colSchoolShort , colTerm , colCShort diff --git a/src/Handler/Utils.hs b/src/Handler/Utils.hs index f899f2991..e45890f58 100644 --- a/src/Handler/Utils.hs +++ b/src/Handler/Utils.hs @@ -75,6 +75,12 @@ visibleWidget :: Bool -> Widget visibleWidget True = mempty visibleWidget False = [whamlet||] +isVisibleWidget :: Bool -> Widget +-- ^ @visibleWidget True@ is an icon that denotes that something™ is visible +isVisibleWidget True = [whamlet||] +isVisibleWidget False = mempty + + commentWidget :: Bool -> Widget -- ^ @commentWidget True@ is an icon that denotes that something™ has a comment commentWidget True = [whamlet||] diff --git a/test/Database.hs b/test/Database.hs index 2fc8a7dc5..8cecdb70e 100755 --- a/test/Database.hs +++ b/test/Database.hs @@ -220,7 +220,7 @@ fillDb = do -- FFP ffp <- insert' Course { courseName = "Fortgeschrittene Funktionale Programmierung" - , courseDescription = Nothing + , courseDescription = Just "

It is fun!

Come to where the functional is!" , courseLinkExternal = Nothing , courseShorthand = "FFP" , courseTerm = TermKey summer2018 @@ -354,7 +354,7 @@ fillDb = do -- datenbanksysteme dbs <- insert' Course { courseName = "Datenbanksysteme" - , courseDescription = Nothing + , courseDescription = Just "Datenbanken banken Daten damit die Daten nicht wanken. Die Datenschützer danken!" , courseLinkExternal = Nothing , courseShorthand = "DBS" , courseTerm = TermKey summer2018