Handler.Utils.Table.Cells cleaned
This commit is contained in:
parent
b98a5c2aa7
commit
9fff50983d
@ -47,19 +47,10 @@ colCourse = sortable (Just "course") (i18nCell MsgCourse)
|
|||||||
anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR)
|
anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR)
|
||||||
[whamlet|#{display courseName}|]
|
[whamlet|#{display courseName}|]
|
||||||
|
|
||||||
-- colCourseDescr1 :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
colCourseDescr :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
||||||
-- colCourseDescr1 = sortable (Just "course") (i18nCell MsgCourse)
|
colCourseDescr = sortable (Just "course") (i18nCell MsgCourse) $ do
|
||||||
-- $ \DBRow{ dbrOutput=(Entity _cid course, _, _, _) } ->
|
course <- view $ _dbrOutput . _1 . _entityVal
|
||||||
-- courseCell course
|
return $ courseCell course
|
||||||
|
|
||||||
-- colCourseDescr1 :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
|
||||||
-- colCourseDescr1 = sortable (Just "course") (i18nCell MsgCourse) $ do
|
|
||||||
-- course <- view $ _dbrOutput . _1 . _entityVal
|
|
||||||
-- return $ courseCell course
|
|
||||||
|
|
||||||
-- colCourseDescr1 :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
|
||||||
-- colCourseDescr1 = colCourseDescr _1
|
|
||||||
|
|
||||||
|
|
||||||
colDescription :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
colDescription :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
||||||
colDescription = sortable Nothing (i18nCell MsgCourseDescription)
|
colDescription = sortable Nothing (i18nCell MsgCourseDescription)
|
||||||
@ -192,7 +183,7 @@ getCourseListR :: Handler Html
|
|||||||
getCourseListR = do -- TODO: Suchfunktion für Kurse und Kürzel!!!
|
getCourseListR = do -- TODO: Suchfunktion für Kurse und Kürzel!!!
|
||||||
muid <- maybeAuthId
|
muid <- maybeAuthId
|
||||||
let colonnade = widgetColonnade $ mconcat
|
let colonnade = widgetColonnade $ mconcat
|
||||||
[ colCourseDescr $ _dbrOutput . _1 . _entityVal
|
[ colCourseDescr
|
||||||
, colCShort
|
, colCShort
|
||||||
, colTerm
|
, colTerm
|
||||||
, maybe mempty (const colRegistered) muid
|
, maybe mempty (const colRegistered) muid
|
||||||
|
|||||||
@ -81,37 +81,3 @@ submissionCell crse shn sid =
|
|||||||
mkText cid = display2widget cid
|
mkText cid = display2widget cid
|
||||||
in anchorCellM' mkCid mkRoute mkText
|
in anchorCellM' mkCid mkRoute mkText
|
||||||
|
|
||||||
|
|
||||||
{-# DEPRECATED colCourseDescr, colsCourseDescr, colsCourseLink "Bad idea, write columns yourself you lazy bat!" #-}
|
|
||||||
-- Generic Columns -- We want to avoid these due to the literals occuring
|
|
||||||
colCourseDescr :: IsDBTable m a => Getting Course s Course -> Colonnade Sortable s (DBCell m a)
|
|
||||||
colCourseDescr getter =
|
|
||||||
sortable (Just "course") (i18nCell MsgCourse) $ do
|
|
||||||
course <- view getter
|
|
||||||
return $ courseCell course
|
|
||||||
|
|
||||||
colsCourseDescr :: IsDBTable m a => Getting Course s Course -> Colonnade Sortable s (DBCell m a)
|
|
||||||
colsCourseDescr getter = mconcat
|
|
||||||
[ sortable (Just "term") (i18nCell MsgTerm) $ do
|
|
||||||
course <- view getter
|
|
||||||
return $ termCell $ courseTerm course
|
|
||||||
, sortable (Just "school") (i18nCell MsgCourseSchool) $ do
|
|
||||||
course <- view getter
|
|
||||||
return $ schoolCell (Just $ courseTerm course) (courseSchool course)
|
|
||||||
, sortable (Just "course") (i18nCell MsgCourse) $ do
|
|
||||||
course <- view getter
|
|
||||||
return $ courseCell course
|
|
||||||
]
|
|
||||||
|
|
||||||
colsCourseLink :: (IsDBTable m a) => Getting CourseLink s CourseLink -> Colonnade Sortable s (DBCell m a)
|
|
||||||
colsCourseLink getter = mconcat
|
|
||||||
[ sortable (Just "term") (i18nCell MsgTerm) $ do
|
|
||||||
crs <- view getter
|
|
||||||
return $ termCell $ crs ^. _1
|
|
||||||
, sortable (Just "school") (i18nCell MsgCourseSchool) $ do
|
|
||||||
crs <- view getter
|
|
||||||
return $ schoolCell (Just $ crs ^. _1) (crs ^. _2)
|
|
||||||
, sortable (Just "course") (i18nCell MsgCourse) $ do
|
|
||||||
crs <- view getter
|
|
||||||
return $ courseLinkCell crs
|
|
||||||
]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user