diff --git a/config/keter.yml b/config/keter.yml index 2df90a924..3b8c9db84 120000 --- a/config/keter.yml +++ b/config/keter.yml @@ -1 +1 @@ -keter_uni2work.yml \ No newline at end of file +keter_testworx.yml \ No newline at end of file diff --git a/messages/de.msg b/messages/de.msg index 87c7b35a1..bee6713b6 100644 --- a/messages/de.msg +++ b/messages/de.msg @@ -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 diff --git a/src/Foundation.hs b/src/Foundation.hs index 97a28fb29..aa2553952 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -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 diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index 4afabc97b..9b8c787cb 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -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 diff --git a/templates/featureList.hamlet b/templates/featureList.hamlet index 1f991c134..8b0ddc647 100644 --- a/templates/featureList.hamlet +++ b/templates/featureList.hamlet @@ -1,6 +1,6 @@
-