add modalDynamic to modalStatic
This commit is contained in:
parent
722f3c80b5
commit
b9ba2167aa
@ -59,7 +59,7 @@ colDescription = sortable Nothing (i18nCell MsgCourseDescription)
|
|||||||
$ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _, _) } ->
|
$ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _, _) } ->
|
||||||
case courseDescription of
|
case courseDescription of
|
||||||
Nothing -> mempty
|
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 :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||||
colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
||||||
@ -73,7 +73,7 @@ colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
|||||||
( case courseDescription of
|
( case courseDescription of
|
||||||
Nothing -> mempty
|
Nothing -> mempty
|
||||||
(Just descr) -> cell
|
(Just descr) -> cell
|
||||||
[whamlet|<span style="float:right"> ^{modalStatic "Beschreibung" descr} |]
|
[whamlet|<span style="float:right"> ^{modalStatic "Beschreibung" descr False} |]
|
||||||
)
|
)
|
||||||
|
|
||||||
colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||||
|
|||||||
@ -76,7 +76,7 @@ courseCell (Course {..}) = anchorCell link name `mappend` desc
|
|||||||
name = citext2widget courseName
|
name = citext2widget courseName
|
||||||
desc = case courseDescription of
|
desc = case courseDescription of
|
||||||
Nothing -> mempty
|
Nothing -> mempty
|
||||||
(Just descr) -> cell [whamlet| <span style="float:right"> ^{modalStatic "Beschreibung" descr} |]
|
(Just descr) -> cell [whamlet| <span style="float:right"> ^{modalStatic "Beschreibung" descr False} |]
|
||||||
|
|
||||||
sheetCell :: IsDBTable m a => CourseLink -> SheetName -> DBCell m a
|
sheetCell :: IsDBTable m a => CourseLink -> SheetName -> DBCell m a
|
||||||
sheetCell crse shn =
|
sheetCell crse shn =
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import Import.NoFoundation
|
|||||||
lipsum :: WidgetT site IO ()
|
lipsum :: WidgetT site IO ()
|
||||||
lipsum = $(widgetFile "widgets/lipsum")
|
lipsum = $(widgetFile "widgets/lipsum")
|
||||||
|
|
||||||
modalStatic :: Html -> Html -> WidgetT site IO ()
|
modalStatic :: Html -> Html -> Bool -> WidgetT site IO ()
|
||||||
modalStatic modalTrigger modalContent = do
|
modalStatic modalTrigger modalContent modalDynamic = do
|
||||||
modalId <- newIdent
|
modalId <- newIdent
|
||||||
triggerId <- newIdent
|
triggerId <- newIdent
|
||||||
$(widgetFile "widgets/modalStatic")
|
$(widgetFile "widgets/modalStatic")
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
<div .modal.js-modal #modal-#{modalId} data-trigger=#{triggerId} data-closeable=true>
|
<div .modal.js-modal #modal-#{modalId} data-trigger=#{triggerId} data-closeable=true data-dynamic=#{modalDynamic}>
|
||||||
#{modalContent}
|
#{modalContent}
|
||||||
|
|||||||
Reference in New Issue
Block a user