This commit is contained in:
SJost 2019-02-21 22:08:49 +01:00
parent 7d72086fd9
commit f869876e12
3 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -75,6 +75,12 @@ visibleWidget :: Bool -> Widget
visibleWidget True = mempty
visibleWidget False = [whamlet|<i .fas .fa-eye-slash>|]
isVisibleWidget :: Bool -> Widget
-- ^ @visibleWidget True@ is an icon that denotes that something™ is visible
isVisibleWidget True = [whamlet|<i .fas .fa-eye>|]
isVisibleWidget False = mempty
commentWidget :: Bool -> Widget
-- ^ @commentWidget True@ is an icon that denotes that something™ has a comment
commentWidget True = [whamlet|<i .fas .fa-comment-alt>|]

View File

@ -220,7 +220,7 @@ fillDb = do
-- FFP
ffp <- insert' Course
{ courseName = "Fortgeschrittene Funktionale Programmierung"
, courseDescription = Nothing
, courseDescription = Just "<h2>It is fun!</h2>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