This commit is contained in:
SJost 2018-09-11 14:18:07 +02:00
parent a575deda78
commit f7f8514f5e
2 changed files with 11 additions and 25 deletions

View File

@ -235,7 +235,7 @@ getProfileDataR = do
, dbtSQLQuery = courseData
, dbtColonnade = mconcat
[ dbRow
, colCourseDescr $ _dbrOutput . _1 . _entityVal -- TODO
, colsCourseDescr $ _dbrOutput . _1 . _entityVal
, sortable (Just "time") (i18nCell MsgRegistered) $ do
regTime <- view $ _dbrOutput . _2 . _unValue
return $ timeCell regTime

View File

@ -89,38 +89,24 @@ submissionCell (crse, E.Value shn, submission) =
-- Generic Columns
-- -colCourseDescr :: (HasEntity c Course, HasDBRow s r, IsDBTable m a) =>
-- - ((c -> Const Course c) -> r -> Const Course r) -> Colonnade Sortable s (DBCell m a)
-- -colCourseDescr courseLens = sortable (Just "course") (i18nCell MsgCourse) $ do
-- - crs <- view $ _dbrOutput . courseLens . _entityVal
-- - return $ courseCell crs
-- -
colCourseDescr :: IsDBTable m a => Getting Course s Course -> Colonnade Sortable s (DBCell m a)
colCourseDescr getter =
sortable (Just "course") (i18nCell MsgCourse) $ do
crs <- view getter
return $ courseCell crs
{-
colCourseDescrG :: (HasCourse s, IsDBTable m a) => Colonnade Sortable s (DBCell m a)
colCourseDescrG =
sortable (Just "course") (i18nCell MsgCourse) $ do
crs <- view course
return $ courseCell crs
course <- view getter
return $ courseCell course
colsCourseCompleteG :: (HasCourse s, IsDBTable m a) => Colonnade Sortable s (DBCell m a)
colsCourseCompleteG = mconcat
colsCourseDescr :: IsDBTable m a => Getting Course s Course -> Colonnade Sortable s (DBCell m a)
colsCourseDescr getter = mconcat
[ sortable (Just "term") (i18nCell MsgTerm) $ do
crs <- view course
return $ termCell $ courseTerm crs
course <- view getter
return $ termCell $ courseTerm course
, sortable (Just "school") (i18nCell MsgCourseSchool) $ do
crs <- view course
return $ schoolCell (Just $ courseTerm crs) (courseSchool crs)
course <- view getter
return $ schoolCell (Just $ courseTerm course) (courseSchool course)
, sortable (Just "course") (i18nCell MsgCourse) $ do
crs <- view course
return $ courseCell crs
course <- view getter
return $ courseCell course
]
-}
colsCourseLink :: (IsDBTable m a) => Getting CourseLink s CourseLink -> Colonnade Sortable s (DBCell m a)
colsCourseLink getter = mconcat