Course description as icon complete
This commit is contained in:
parent
f869876e12
commit
68d36b2fe0
@ -34,10 +34,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}|]
|
||||||
|
|
||||||
colCourseDescr :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
-- colCourseDescr :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
||||||
colCourseDescr = sortable (Just "course") (i18nCell MsgCourse) $ do
|
-- colCourseDescr = sortable (Just "course") (i18nCell MsgCourse) $ do
|
||||||
course <- view $ _dbrOutput . _1 . _entityVal
|
-- course <- view $ _dbrOutput . _1 . _entityVal
|
||||||
return $ courseCell course
|
-- return $ courseCell course
|
||||||
|
|
||||||
colDescription :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
colDescription :: IsDBTable m a => Colonnade Sortable CourseTableData (DBCell m a)
|
||||||
colDescription = sortable Nothing mempty
|
colDescription = sortable Nothing mempty
|
||||||
@ -51,19 +51,19 @@ colCShort = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
|||||||
$ \DBRow{ dbrOutput=(Entity _ Course{..}, _, _, _) } ->
|
$ \DBRow{ dbrOutput=(Entity _ Course{..}, _, _, _) } ->
|
||||||
anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) [whamlet|#{display courseShorthand}|]
|
anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) [whamlet|#{display courseShorthand}|]
|
||||||
|
|
||||||
colCShortDescr :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
-- colCShortDescr :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||||
colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
-- colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
||||||
$ \DBRow{ dbrOutput=(Entity _ Course{..}, _, _, _) } -> mappend
|
-- $ \DBRow{ dbrOutput=(Entity _ Course{..}, _, _, _) } -> mappend
|
||||||
( anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) [whamlet|#{display courseShorthand}|] )
|
-- ( anchorCell (CourseR courseTerm courseSchool courseShorthand CShowR) [whamlet|#{display courseShorthand}|] )
|
||||||
( case courseDescription of
|
-- ( case courseDescription of
|
||||||
Nothing -> mempty
|
-- Nothing -> mempty
|
||||||
(Just descr) -> cell
|
-- (Just descr) -> cell
|
||||||
[whamlet|
|
-- [whamlet|
|
||||||
$newline never
|
-- $newline never
|
||||||
<div>
|
-- <div>
|
||||||
^{modal "Beschreibung" (Right $ toWidget descr)}
|
-- ^{modal "Beschreibung" (Right $ toWidget descr)}
|
||||||
|]
|
-- |]
|
||||||
)
|
-- )
|
||||||
|
|
||||||
colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
colTerm :: IsDBTable m a => Colonnade _ CourseTableData (DBCell m a)
|
||||||
colTerm = sortable (Just "term") (i18nCell MsgTerm)
|
colTerm = sortable (Just "term") (i18nCell MsgTerm)
|
||||||
@ -221,7 +221,8 @@ getTermSchoolCourseListR tid ssh = do
|
|||||||
muid <- maybeAuthId
|
muid <- maybeAuthId
|
||||||
let colonnade = widgetColonnade $ mconcat
|
let colonnade = widgetColonnade $ mconcat
|
||||||
[ dbRow
|
[ dbRow
|
||||||
, colCShortDescr
|
, colCShort
|
||||||
|
, colDescription
|
||||||
, colRegFrom
|
, colRegFrom
|
||||||
, colRegTo
|
, colRegTo
|
||||||
, colMembers
|
, colMembers
|
||||||
@ -244,7 +245,8 @@ getTermCourseListR tid = do
|
|||||||
muid <- maybeAuthId
|
muid <- maybeAuthId
|
||||||
let colonnade = widgetColonnade $ mconcat
|
let colonnade = widgetColonnade $ mconcat
|
||||||
[ dbRow
|
[ dbRow
|
||||||
, colCShortDescr
|
, colCShort
|
||||||
|
, colDescription
|
||||||
, colSchoolShort
|
, colSchoolShort
|
||||||
, colRegFrom
|
, colRegFrom
|
||||||
, colRegTo
|
, colRegTo
|
||||||
|
|||||||
@ -218,9 +218,22 @@ fillDb = do
|
|||||||
repsert sdInf $ StudyTerms 79 (Just "IfI") (Just "Institut für Informatik")
|
repsert sdInf $ StudyTerms 79 (Just "IfI") (Just "Institut für Informatik")
|
||||||
repsert sdMath $ StudyTerms 105 (Just "MI" ) (Just "Mathematisches Institut")
|
repsert sdMath $ StudyTerms 105 (Just "MI" ) (Just "Mathematisches Institut")
|
||||||
-- FFP
|
-- FFP
|
||||||
|
let nbrs :: [Int]
|
||||||
|
nbrs = [1,2,3,27,7,1]
|
||||||
ffp <- insert' Course
|
ffp <- insert' Course
|
||||||
{ courseName = "Fortgeschrittene Funktionale Programmierung"
|
{ courseName = "Fortgeschrittene Funktionale Programmierung"
|
||||||
, courseDescription = Just "<h2>It is fun!</h2>Come to where the functional is!"
|
, courseDescription = Just [shamlet|
|
||||||
|
<h2>It is fun!
|
||||||
|
<p>Come to where the functional is!
|
||||||
|
<section>
|
||||||
|
<h3>Functional programming can be done in Haskell!
|
||||||
|
<p>This is not a joke, this is serious!
|
||||||
|
<section>
|
||||||
|
<h3>Consider some numbers
|
||||||
|
<ul>
|
||||||
|
$forall n <- nbrs
|
||||||
|
<li>Number #{n}
|
||||||
|
|]
|
||||||
, courseLinkExternal = Nothing
|
, courseLinkExternal = Nothing
|
||||||
, courseShorthand = "FFP"
|
, courseShorthand = "FFP"
|
||||||
, courseTerm = TermKey summer2018
|
, courseTerm = TermKey summer2018
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user