diff --git a/config/keter.yml b/config/keter.yml deleted file mode 100644 index e9ed09568..000000000 --- a/config/keter.yml +++ /dev/null @@ -1,43 +0,0 @@ -root: .. - -stanzas: - - type: webapp - - # Name of your executable. You are unlikely to need to change this. - # Note that all file paths are relative to the keter.yml file. - # - # The path given is for Stack projects. If you're still using cabal, change - # to - # exec: ../dist/build/uniworx/uniworx - exec: ../dist/bin/uniworx - - # Command line options passed to your application. - args: [] - - hosts: - - uni2work.ifi.lmu.de - - ssl: true - - forward-env: - - LDAPURI - - LDAPDN - - LDAPPW - - LDAPBN - - DETAILED_LOGGING - - LOG_ALL - -# Use the following to automatically copy your bundle upon creation via `yesod -# keter`. Uses `scp` internally, so you can set it to a remote destination -# copy-to: user@host:/opt/keter/incoming/ -copy-to: root@uni2work.ifi.lmu.de:/opt/keter/incoming/ -copy-to-args: [] - - -# If you would like to have Keter automatically create a PostgreSQL database -# and set appropriate environment variables for it to be discovered, uncomment -# the following line. -plugins: - postgres: - - server: uniworxdb - port: 5432 diff --git a/config/keter.yml b/config/keter.yml new file mode 120000 index 000000000..3b8c9db84 --- /dev/null +++ b/config/keter.yml @@ -0,0 +1 @@ +keter_testworx.yml \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index ebe1cbe53..7fc81e2ff 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env/sh +#!/usr/bin/env sh configFile="" @@ -11,7 +11,7 @@ case "$1" in production) ln -svf "keter_uni2work.yml" config/keter.yml - yesod keter && git tag live && git push origin live + yesod keter && git -f tag live && git push origin live ;; *) echo "Usage: $0 (test|production)" >&2 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 0af04d01f..7637293c8 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -644,6 +644,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" @@ -659,7 +665,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 @@ -837,12 +843,6 @@ pageActions (HomeR) = , menuItemRoute = AdminTestR , menuItemAccessCallback' = return True } - , NavbarAside $ MenuItem - { menuItemLabel = "Impressum" - , menuItemIcon = Just "book" - , menuItemRoute = VersionR - , menuItemAccessCallback' = return True - } ] pageActions _ = [] @@ -851,6 +851,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 @@
-