mino fixes

This commit is contained in:
SJost 2018-07-03 18:52:37 +02:00
parent de7d41d0e4
commit 58010fec3b
5 changed files with 16 additions and 14 deletions

View File

@ -1 +1 @@
keter_uni2work.yml
keter_testworx.yml

View File

@ -115,6 +115,7 @@ CorrectorsDefaulted: Korrektoren-Liste wurde aus bisherigen Übungsblättern die
Users: Benutzer
HomeHeading: Aktuelle Termine
LoginHeading: Login bitte mit "@campus.lmu.de" angeben
ProfileHeading: Benutzerprofil und Einstellungen
ProfileDataHeading: Gespeicherte Benutzerdaten
ImpressumHeading: Impressum

View File

@ -642,6 +642,12 @@ defaultLinks = -- Define the menu items of the header.
, menuItemRoute = ProfileR
, menuItemAccessCallback' = isJust <$> maybeAuthPair
}
, NavbarRight $ MenuItem
{ menuItemLabel = "Impressum"
, menuItemIcon = Just "book"
, menuItemRoute = VersionR
, menuItemAccessCallback' = return True
}
, NavbarSecondary $ MenuItem
{ menuItemLabel = "Login"
, menuItemIcon = Just "sign-in-alt"
@ -657,7 +663,7 @@ defaultLinks = -- Define the menu items of the header.
, NavbarAside $ MenuItem
{ menuItemLabel = "Kurse"
, menuItemIcon = Just "calendar-alt"
, menuItemRoute = CourseListR -- should be CourseListActiveR or similar in the future
, menuItemRoute = TermCurrentR -- should be CourseListActiveR or similar in the future
, menuItemAccessCallback' = return True
}
, NavbarAside $ MenuItem
@ -835,12 +841,6 @@ pageActions (HomeR) =
, menuItemRoute = AdminTestR
, menuItemAccessCallback' = return True
}
, NavbarAside $ MenuItem
{ menuItemLabel = "Impressum"
, menuItemIcon = Just "book"
, menuItemRoute = VersionR
, menuItemAccessCallback' = return True
}
]
pageActions _ = []
@ -849,6 +849,8 @@ i18nHeading :: (MonadWidget m, RenderMessage site msg, HandlerSite m ~ site) =>
i18nHeading msg = liftWidgetT $ toWidget =<< getMessageRender <*> pure msg
pageHeading :: Route UniWorX -> Maybe Widget
pageHeading (AuthR _)
= Just $ i18nHeading MsgLoginHeading
pageHeading HomeR
= Just $ i18nHeading MsgHomeHeading
pageHeading UsersR

View File

@ -29,12 +29,11 @@ getCourseListR = redirect TermCurrentR
getTermCurrentR :: Handler Html
getTermCurrentR = do
termIds <- runDB $ selectKeysList [TermActive ==. True] [] -- [Desc TermName] does not work, since database representation has wrong ordering
termIds <- runDB $ selectKeysList [TermActive ==. True] [Desc TermName]
case fromNullable termIds of
Nothing -> notFound
(Just (maximum -> tid)) -> getTermCourseListR tid
-- why not "redirect $ TermCourseListR tid"
-- Would save us breadcrumbs, headings, etc.?
(Just (maximum -> tid)) -> -- getTermCourseListR tid
redirect $ TermCourseListR tid -- redirect avids problematic breadcrumbs, headings, etc.
getTermCourseListR :: TermId -> Handler Html

View File

@ -1,6 +1,6 @@
<p>
<h1>
Momentan noch unimplementierte Funktionalitäten
<h3>
Momentan noch unimplementierte Funktionalitäten
<ul>
<li>
<h4>