CourseDescription not working properly in CourseList
This commit is contained in:
parent
34f94bb886
commit
04ac80a8ba
@ -822,6 +822,14 @@ pageActions (TermCourseListR tid) =
|
||||
, menuItemAccessCallback' = return True
|
||||
}
|
||||
]
|
||||
pageActions (CourseListR) =
|
||||
[ PageActionPrime $ MenuItem
|
||||
{ menuItemLabel = "Neuen Kurs anlegen"
|
||||
, menuItemIcon = Just "book"
|
||||
, menuItemRoute = CourseNewR
|
||||
, menuItemAccessCallback' = return True
|
||||
}
|
||||
]
|
||||
pageActions (CourseR tid csh CShowR) =
|
||||
[ PageActionPrime $ MenuItem
|
||||
{ menuItemLabel = "Kurs Editieren"
|
||||
|
||||
@ -38,7 +38,15 @@ type CourseTableData = DBRow (Entity Course, Int64, Bool)
|
||||
colCourse :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||
colCourse = sortable (Just "course") (i18nCell MsgCourse)
|
||||
$ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _) } ->
|
||||
anchorCell (CourseR courseTerm courseShorthand CShowR) [whamlet|#{display courseName}|]
|
||||
anchorCell (CourseR courseTerm courseShorthand CShowR)
|
||||
[whamlet|#{display courseName}|]
|
||||
|
||||
colDescription :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||
colDescription = sortable Nothing (i18nCell MsgCourseDescription)
|
||||
$ \DBRow{ dbrOutput=(Entity cid Course{..}, _, _) } ->
|
||||
case courseDescription of
|
||||
Nothing -> cell mempty
|
||||
(Just d)-> cell [whamlet|<div .container><p data-tooltip="#{d}">|]
|
||||
|
||||
colCShort :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||
colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
||||
@ -139,6 +147,7 @@ getCourseListR = do -- TODO: Suchfunktion für Kurse und Kürzel!!!
|
||||
[ colCourse
|
||||
, colCShort
|
||||
, colTerm
|
||||
-- , colDescription -- does not work as intended issue #80
|
||||
, maybe mempty (const colRegistered) muid
|
||||
]
|
||||
whereClause = const $ E.val True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user