diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index fa898bc54..c0845cf30 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -59,7 +59,7 @@ colDescription = sortable Nothing (i18nCell MsgCourseDescription) $ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _, _) } -> case courseDescription of Nothing -> mempty - (Just descr) -> cell $ modalStatic "Beschreibung" descr + (Just descr) -> cell $ modalStatic "Beschreibung" descr False colCShort :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a) colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort) @@ -73,7 +73,7 @@ colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort) ( case courseDescription of Nothing -> mempty (Just descr) -> cell - [whamlet| ^{modalStatic "Beschreibung" descr} |] + [whamlet| ^{modalStatic "Beschreibung" descr False} |] ) colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a) diff --git a/src/Handler/Utils/Table/Cells.hs b/src/Handler/Utils/Table/Cells.hs index 25a53e223..ea3487088 100644 --- a/src/Handler/Utils/Table/Cells.hs +++ b/src/Handler/Utils/Table/Cells.hs @@ -76,7 +76,7 @@ courseCell (Course {..}) = anchorCell link name `mappend` desc name = citext2widget courseName desc = case courseDescription of Nothing -> mempty - (Just descr) -> cell [whamlet| ^{modalStatic "Beschreibung" descr} |] + (Just descr) -> cell [whamlet| ^{modalStatic "Beschreibung" descr False} |] sheetCell :: IsDBTable m a => CourseLink -> SheetName -> DBCell m a sheetCell crse shn = diff --git a/src/Handler/Utils/Templates.hs b/src/Handler/Utils/Templates.hs index 182c1d6a5..c98084962 100644 --- a/src/Handler/Utils/Templates.hs +++ b/src/Handler/Utils/Templates.hs @@ -7,8 +7,8 @@ import Import.NoFoundation lipsum :: WidgetT site IO () lipsum = $(widgetFile "widgets/lipsum") -modalStatic :: Html -> Html -> WidgetT site IO () -modalStatic modalTrigger modalContent = do +modalStatic :: Html -> Html -> Bool -> WidgetT site IO () +modalStatic modalTrigger modalContent modalDynamic = do modalId <- newIdent triggerId <- newIdent $(widgetFile "widgets/modalStatic") diff --git a/templates/widgets/modalStatic.hamlet b/templates/widgets/modalStatic.hamlet index c6a78a6d3..ae09cb507 100644 --- a/templates/widgets/modalStatic.hamlet +++ b/templates/widgets/modalStatic.hamlet @@ -1,2 +1,2 @@ -
+
#{modalContent}