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=""
|
configFile=""
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ case "$1" in
|
|||||||
production)
|
production)
|
||||||
ln -svf "keter_uni2work.yml" config/keter.yml
|
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
|
echo "Usage: $0 (test|production)" >&2
|
||||||
|
|||||||
@ -115,6 +115,7 @@ CorrectorsDefaulted: Korrektoren-Liste wurde aus bisherigen Übungsblättern die
|
|||||||
|
|
||||||
Users: Benutzer
|
Users: Benutzer
|
||||||
HomeHeading: Aktuelle Termine
|
HomeHeading: Aktuelle Termine
|
||||||
|
LoginHeading: Login bitte mit "@campus.lmu.de" angeben
|
||||||
ProfileHeading: Benutzerprofil und Einstellungen
|
ProfileHeading: Benutzerprofil und Einstellungen
|
||||||
ProfileDataHeading: Gespeicherte Benutzerdaten
|
ProfileDataHeading: Gespeicherte Benutzerdaten
|
||||||
ImpressumHeading: Impressum
|
ImpressumHeading: Impressum
|
||||||
|
|||||||
@ -644,6 +644,12 @@ defaultLinks = -- Define the menu items of the header.
|
|||||||
, menuItemRoute = ProfileR
|
, menuItemRoute = ProfileR
|
||||||
, menuItemAccessCallback' = isJust <$> maybeAuthPair
|
, menuItemAccessCallback' = isJust <$> maybeAuthPair
|
||||||
}
|
}
|
||||||
|
, NavbarRight $ MenuItem
|
||||||
|
{ menuItemLabel = "Impressum"
|
||||||
|
, menuItemIcon = Just "book"
|
||||||
|
, menuItemRoute = VersionR
|
||||||
|
, menuItemAccessCallback' = return True
|
||||||
|
}
|
||||||
, NavbarSecondary $ MenuItem
|
, NavbarSecondary $ MenuItem
|
||||||
{ menuItemLabel = "Login"
|
{ menuItemLabel = "Login"
|
||||||
, menuItemIcon = Just "sign-in-alt"
|
, menuItemIcon = Just "sign-in-alt"
|
||||||
@ -659,7 +665,7 @@ defaultLinks = -- Define the menu items of the header.
|
|||||||
, NavbarAside $ MenuItem
|
, NavbarAside $ MenuItem
|
||||||
{ menuItemLabel = "Kurse"
|
{ menuItemLabel = "Kurse"
|
||||||
, menuItemIcon = Just "calendar-alt"
|
, 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
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
, NavbarAside $ MenuItem
|
, NavbarAside $ MenuItem
|
||||||
@ -837,12 +843,6 @@ pageActions (HomeR) =
|
|||||||
, menuItemRoute = AdminTestR
|
, menuItemRoute = AdminTestR
|
||||||
, menuItemAccessCallback' = return True
|
, menuItemAccessCallback' = return True
|
||||||
}
|
}
|
||||||
, NavbarAside $ MenuItem
|
|
||||||
{ menuItemLabel = "Impressum"
|
|
||||||
, menuItemIcon = Just "book"
|
|
||||||
, menuItemRoute = VersionR
|
|
||||||
, menuItemAccessCallback' = return True
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
pageActions _ = []
|
pageActions _ = []
|
||||||
@ -851,6 +851,8 @@ i18nHeading :: (MonadWidget m, RenderMessage site msg, HandlerSite m ~ site) =>
|
|||||||
i18nHeading msg = liftWidgetT $ toWidget =<< getMessageRender <*> pure msg
|
i18nHeading msg = liftWidgetT $ toWidget =<< getMessageRender <*> pure msg
|
||||||
|
|
||||||
pageHeading :: Route UniWorX -> Maybe Widget
|
pageHeading :: Route UniWorX -> Maybe Widget
|
||||||
|
pageHeading (AuthR _)
|
||||||
|
= Just $ i18nHeading MsgLoginHeading
|
||||||
pageHeading HomeR
|
pageHeading HomeR
|
||||||
= Just $ i18nHeading MsgHomeHeading
|
= Just $ i18nHeading MsgHomeHeading
|
||||||
pageHeading UsersR
|
pageHeading UsersR
|
||||||
|
|||||||
@ -29,12 +29,11 @@ getCourseListR = redirect TermCurrentR
|
|||||||
|
|
||||||
getTermCurrentR :: Handler Html
|
getTermCurrentR :: Handler Html
|
||||||
getTermCurrentR = do
|
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
|
case fromNullable termIds of
|
||||||
Nothing -> notFound
|
Nothing -> notFound
|
||||||
(Just (maximum -> tid)) -> getTermCourseListR tid
|
(Just (maximum -> tid)) -> -- getTermCourseListR tid
|
||||||
-- why not "redirect $ TermCourseListR tid"
|
redirect $ TermCourseListR tid -- redirect avids problematic breadcrumbs, headings, etc.
|
||||||
-- Would save us breadcrumbs, headings, etc.?
|
|
||||||
|
|
||||||
|
|
||||||
getTermCourseListR :: TermId -> Handler Html
|
getTermCourseListR :: TermId -> Handler Html
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<p>
|
<p>
|
||||||
<h1>
|
<h3>
|
||||||
Momentan noch unimplementierte Funktionalitäten
|
Momentan noch unimplementierte Funktionalitäten
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<h4>
|
<h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user