Merge branch 'master' of gitlab.cip.ifi.lmu.de:jost/UniWorX
This commit is contained in:
commit
d756277f93
@ -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
|
||||
1
config/keter.yml
Symbolic link
1
config/keter.yml
Symbolic link
@ -0,0 +1 @@
|
||||
keter_testworx.yml
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<p>
|
||||
<h1>
|
||||
Momentan noch unimplementierte Funktionalitäten
|
||||
<h3>
|
||||
Momentan noch unimplementierte Funktionalitäten
|
||||
<ul>
|
||||
<li>
|
||||
<h4>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user