Default sorting for TermListR added
This commit is contained in:
parent
d90093bed4
commit
d1c0b67627
@ -68,7 +68,7 @@ getTermShowR = do
|
||||
provideRep $ toJSON . map fst <$> runDB (E.select $ E.from termData)
|
||||
provideRep $ do
|
||||
let colonnadeTerms = widgetColonnade $ mconcat
|
||||
[ sortable (Just "termid") "Kürzel" $ \(Entity tid _, _) -> anchorCell
|
||||
[ sortable (Just "term-id") "Kürzel" $ \(Entity tid _, _) -> anchorCell
|
||||
(TermCourseListR tid)
|
||||
[whamlet|#{toPathPiece tid}|]
|
||||
, sortable (Just "lecture-start") (i18nCell MsgLectureStart) $ \(Entity _ Term{..},_) ->
|
||||
@ -104,7 +104,7 @@ getTermShowR = do
|
||||
-- #{termToText termName}
|
||||
-- |]
|
||||
-- ]
|
||||
let validator = def
|
||||
let validator = def & defaultSorting [SortDescBy "term-id"]
|
||||
table <- runDB $ dbTableWidget' validator DBTable
|
||||
{ dbtSQLQuery = termData
|
||||
, dbtRowKey = (E.^. TermId)
|
||||
@ -123,7 +123,7 @@ getTermShowR = do
|
||||
, ( "lecture-end"
|
||||
, SortColumn $ \term -> term E.^. TermLectureEnd
|
||||
)
|
||||
, ( "termid"
|
||||
, ( "term-id"
|
||||
, SortColumn $ \term -> term E.^. TermId
|
||||
)
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user