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! UserAccountDeleted name@Text: Konto für #{name} wurde gelöscht!
HelpTitle : Hilfe
HelpAnswer: Antworten an HelpAnswer: Antworten an
HelpUser: Meinen Benutzeraccount HelpUser: Meinen Benutzeraccount
HelpAnonymous: Keine Antwort (Anonym) 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. 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. HelpSent: Ihre Supportanfrage wurde weitergeleitet.
InfoLecturerTitle: Hinweis für Veranstalter
SystemMessageFrom: Sichtbar ab SystemMessageFrom: Sichtbar ab
SystemMessageTo: Sichtbar bis SystemMessageTo: Sichtbar bis
SystemMessageAuthenticatedOnly: Nur angemeldet SystemMessageAuthenticatedOnly: Nur angemeldet

5
routes
View File

@ -11,7 +11,7 @@
-- --
-- Access Tags: -- Access Tags:
-- !free -- free for all -- !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) -- !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) -- !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) -- !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/test AdminTestR GET POST
/admin/errMsg AdminErrMsgR GET POST /admin/errMsg AdminErrMsgR GET POST
/info VersionR GET !free /info VersionR GET !free
/info/lecturer InfoLecturerR GET !lecturer
/help HelpR GET POST !free /help HelpR GET POST !free
/profile ProfileR GET POST !free /profile ProfileR GET POST !free
/profile/data ProfileDataR 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)) return (E.countRows :: E.SqlExpr (E.Value Int64))
guardMExceptT (c>0) (unauthorizedI MsgUnauthorizedLecturer) guardMExceptT (c>0) (unauthorizedI MsgUnauthorizedLecturer)
return Authorized return Authorized
-- lecturer for any school will do
_ -> exceptT return return $ do _ -> exceptT return return $ do
authId <- maybeExceptT AuthenticationRequired $ lift maybeAuthId authId <- maybeExceptT AuthenticationRequired $ lift maybeAuthId
void . maybeMExceptT (unauthorizedI MsgUnauthorizedSchoolLecturer) $ selectFirst [UserLecturerUser ==. authId] [] void . maybeMExceptT (unauthorizedI MsgUnauthorizedSchoolLecturer) $ selectFirst [UserLecturerUser ==. authId] []
@ -1225,14 +1226,14 @@ pageActions (ProfileR) =
, menuItemModal = False , menuItemModal = False
, menuItemAccessCallback' = return True , menuItemAccessCallback' = return True
} }
-- , MenuItem , MenuItem
-- { menuItemType = PageActionSecondary { menuItemType = PageActionSecondary
-- , menuItemLabel = MsgMenuAuthPreds , menuItemLabel = MsgMenuAuthPreds
-- , menuItemIcon = Nothing , menuItemIcon = Nothing
-- , menuItemRoute = SomeRoute AuthPredsR , menuItemRoute = SomeRoute AuthPredsR
-- , menuItemModal = True , menuItemModal = True
-- , menuItemAccessCallback' = return True , menuItemAccessCallback' = return True
-- } }
] ]
pageActions TermShowR = pageActions TermShowR =
[ MenuItem [ MenuItem

View File

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

View File

@ -6,3 +6,5 @@
<p>Text2 <p>Text2
TODO breadcrumbs und titel 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