diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index 7fa4c8bce..8e9213360 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -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 diff --git a/routes b/routes index 1c1535769..99a2bf3d0 100644 --- a/routes +++ b/routes @@ -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 diff --git a/src/Foundation.hs b/src/Foundation.hs index 6cb21a242..28eb1c33a 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -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 diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index ae3691266..d4a5af5c0 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -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 diff --git a/templates/infoLecturer.hamlet b/templates/infoLecturer.hamlet index e6336a083..73df29549 100644 --- a/templates/infoLecturer.hamlet +++ b/templates/infoLecturer.hamlet @@ -5,4 +5,6 @@

Übungsbetrieb

Text2 TODO breadcrumbs und titel - TODO PageActionPrime für HelpLecturerR on Home and Info \ No newline at end of file + TODO PageActionPrime für HelpLecturerR on Home and Info + +

Um 2:00h gelegentlich Wartungsarbeiten stattfinden => Deadlines mögichst davor oder danach