LecturerInfoPage Stub

This commit is contained in:
SJost 2019-02-14 11:24:56 +01:00
parent 20799675ff
commit d0ed667cf3
5 changed files with 28 additions and 11 deletions

View File

@ -486,6 +486,7 @@ CorrGrade: Korrekturen eintragen
UserAccountDeleted name@Text: Konto für #{name} wurde gelöscht!
HelpTitle : Hilfe
HelpAnswer: Antworten an
HelpUser: Meinen Benutzeraccount
HelpAnonymous: Keine Antwort (Anonym)
@ -495,6 +496,9 @@ HelpProblemPage: Problematische Seite
HelpIntroduction: Wenn Ihnen die Benutzung dieser Webseite Schwierigkeiten bereitet oder Sie einen verbesserbaren Umstand entdecken bitten wir Sie uns das zu melden, auch wenn Sie Ihr Problem bereits selbst lösen konnten. Wir passen die Seite ständig an und versuchen sie auch für zukünftige Benutzer so einsichtig wie möglich zu halten.
HelpSent: Ihre Supportanfrage wurde weitergeleitet.
InfoLecturerTitle: Hinweis für Veranstalter
SystemMessageFrom: Sichtbar ab
SystemMessageTo: Sichtbar bis
SystemMessageAuthenticatedOnly: Nur angemeldet

5
routes
View File

@ -11,7 +11,7 @@
--
-- Access Tags:
-- !free -- free for all
-- !lecturer -- lecturer for this course (or the school, if route is not connected to a course)
-- !lecturer -- lecturer for this course (or for any school, if route is not connected to a course)
-- !corrector -- corrector for this sheet (or the submission, if route is connected to a submission, or the course, if route is not connected to a sheet, or any course, if route is not connected to a course)
-- !registered -- participant for this course (no effect outside of courses)
-- !participant -- connected with a given course (not necessarily registered), i.e. has a submission, is a corrector, etc. (no effect outside of courses)
@ -40,8 +40,11 @@
/admin/test AdminTestR GET POST
/admin/errMsg AdminErrMsgR GET POST
/info VersionR GET !free
/info/lecturer InfoLecturerR GET !lecturer
/help HelpR GET POST !free
/profile ProfileR GET POST !free
/profile/data ProfileDataR GET POST !free

View File

@ -430,6 +430,7 @@ tagAccessPredicate AuthLecturer = APDB $ \route _ -> case route of
return (E.countRows :: E.SqlExpr (E.Value Int64))
guardMExceptT (c>0) (unauthorizedI MsgUnauthorizedLecturer)
return Authorized
-- lecturer for any school will do
_ -> exceptT return return $ do
authId <- maybeExceptT AuthenticationRequired $ lift maybeAuthId
void . maybeMExceptT (unauthorizedI MsgUnauthorizedSchoolLecturer) $ selectFirst [UserLecturerUser ==. authId] []
@ -1225,14 +1226,14 @@ pageActions (ProfileR) =
, menuItemModal = False
, menuItemAccessCallback' = return True
}
-- , MenuItem
-- { menuItemType = PageActionSecondary
-- , menuItemLabel = MsgMenuAuthPreds
-- , menuItemIcon = Nothing
-- , menuItemRoute = SomeRoute AuthPredsR
-- , menuItemModal = True
-- , menuItemAccessCallback' = return True
-- }
, MenuItem
{ menuItemType = PageActionSecondary
, menuItemLabel = MsgMenuAuthPreds
, menuItemIcon = Nothing
, menuItemRoute = SomeRoute AuthPredsR
, menuItemModal = True
, menuItemAccessCallback' = return True
}
]
pageActions TermShowR =
[ MenuItem

View File

@ -250,11 +250,18 @@ postHelpR = do
tell . pure =<< messageI Success MsgHelpSent
defaultLayout $ do
setTitle "Hilfe" -- TODO: International
setTitleI MsgHelpTitle
isModal <- hasCustomHeader HeaderIsModal
$(widgetFile "help")
getInfoLecturerR :: Handler Html
getInfoLecturerR =
defaultLayout $ do
setTitleI MsgInfoLecturerTitle
$(widgetFile "infoLecturer")
getAuthPredsR, postAuthPredsR :: Handler Html
getAuthPredsR = postAuthPredsR
postAuthPredsR = do

View File

@ -5,4 +5,6 @@
<h2>Übungsbetrieb
<p>Text2
TODO breadcrumbs und titel
TODO PageActionPrime für HelpLecturerR on Home and Info
TODO PageActionPrime für HelpLecturerR on Home and Info
<p>Um 2:00h gelegentlich Wartungsarbeiten stattfinden => Deadlines mögichst davor oder danach