diff --git a/routes b/routes index 68b7879f1..80b2e5857 100644 --- a/routes +++ b/routes @@ -52,7 +52,7 @@ / CShowR GET !free /register CRegisterR POST !time /edit CEditR GET POST - /subs CourseCorrectionsR GET POST + /subs CCorrectionsR GET POST /ex SheetListR GET !registered !materials !/ex/new SheetNewR GET POST /ex/#Text SheetR: diff --git a/src/Foundation.hs b/src/Foundation.hs index 61720964e..97a28fb29 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -592,20 +592,25 @@ instance YesodBreadcrumbs UniWorX where breadcrumb (CourseR tid csh CShowR) = return (csh , Just $ TermCourseListR tid) -- (CourseR tid csh CRegisterR) -- is POST only breadcrumb (CourseR tid csh CEditR) = return ("Editieren", Just $ CourseR tid csh CShowR) - breadcrumb (CourseR tid csh SheetListR) = return ("Übungen",Just $ CourseR tid csh CShowR) - breadcrumb (CourseR tid csh SheetNewR ) = return ("Neu", Just $ CourseR tid csh SheetListR) + breadcrumb (CourseR tid csh CCorrectionsR) = return ("Abgaben",Just $ CourseR tid csh CShowR) + breadcrumb (CourseR tid csh SheetListR) = return ("Übungen" , Just $ CourseR tid csh CShowR) + breadcrumb (CourseR tid csh SheetNewR ) = return ("Neu", Just $ CourseR tid csh SheetListR) breadcrumb (CSheetR tid csh shn SShowR) = return (shn, Just $ CourseR tid csh SheetListR) - -- (CSheetR tid csh shn SFileR) -- just for Downloads breadcrumb (CSheetR tid csh shn SEditR) = return ("Edit", Just $ CSheetR tid csh shn SShowR) breadcrumb (CSheetR tid csh shn SDelR ) = return ("DELETE", Just $ CSheetR tid csh shn SShowR) - breadcrumb (CSheetR tid csh shn SCorrR) = return ("Korrektoren", Just $ CSheetR tid csh shn SShowR) breadcrumb (CSheetR tid csh shn SSubsR) = return ("Abgaben", Just $ CSheetR tid csh shn SShowR) breadcrumb (CSheetR tid csh shn SubmissionNewR) = return ("Abgabe", Just $ CSheetR tid csh shn SShowR) breadcrumb (CSheetR tid csh shn SubmissionOwnR) = return ("Abgabe", Just $ CSheetR tid csh shn SShowR) breadcrumb (CSubmissionR tid csh shn _ SubShowR) = return ("Abgabe", Just $ CSheetR tid csh shn SShowR) +-- (CSubmissionR tid csh shn _ SubArchiveR) -- just for Download breadcrumb (CSubmissionR tid csh shn cid CorrectionR) = return ("Korrektur", Just $ CSubmissionR tid csh shn cid SubShowR) +-- (CSubmissionR tid csh shn _ SubDownloadR) -- just for Download + breadcrumb (CSheetR tid csh shn SCorrR) = return ("Korrektoren", Just $ CSheetR tid csh shn SShowR) + -- (CSheetR tid csh shn SFileR) -- just for Downloads -- Others + breadcrumb (CorrectionsR) = return ("Korrekturen", Just HomeR) + breadcrumb (CorrectionsUploadR) = return ("Hochladen", Just CorrectionsR) breadcrumb _ = return ("Uni2work", Nothing) -- Default is no breadcrumb at all submissionList :: TermId -> Text -> Text -> UserId -> DB [E.Value SubmissionId] @@ -714,7 +719,7 @@ pageActions (CourseR tid csh CShowR) = , PageActionPrime $ MenuItem { menuItemLabel = "Abgaben" , menuItemIcon = Nothing - , menuItemRoute = CourseR tid csh CourseCorrectionsR + , menuItemRoute = CourseR tid csh CCorrectionsR , menuItemAccessCallback' = return True } , PageActionSecondary $ MenuItem @@ -881,7 +886,7 @@ pageHeading (CourseR tid csh CShowR) -- (CourseR tid csh CRegisterR) -- just for POST pageHeading (CourseR tid csh CEditR) = Just $ i18nHeading $ MsgCourseEditHeading tid csh -pageHeading (CourseR tid csh CourseCorrectionsR) +pageHeading (CourseR tid csh CCorrectionsR) = Just $ i18nHeading $ MsgSubmissionsCourse tid csh pageHeading (CourseR tid csh SheetListR) = Just $ i18nHeading $ MsgSheetList tid csh diff --git a/src/Handler/Corrections.hs b/src/Handler/Corrections.hs index 013b85066..360ceba5a 100644 --- a/src/Handler/Corrections.hs +++ b/src/Handler/Corrections.hs @@ -307,9 +307,9 @@ postCorrectionsR = do [ downloadAction ] -getCourseCorrectionsR, postCourseCorrectionsR :: TermId -> Text -> Handler TypedContent -getCourseCorrectionsR = postCourseCorrectionsR -postCourseCorrectionsR tid csh = do +getCCorrectionsR, postCCorrectionsR :: TermId -> Text -> Handler TypedContent +getCCorrectionsR = postCCorrectionsR +postCCorrectionsR tid csh = do Entity cid _ <- runDB $ getBy404 $ CourseTermShort tid csh let whereClause = courseIs cid colonnade = mconcat diff --git a/templates/featureList.hamlet b/templates/featureList.hamlet index 1c6f1a431..1f991c134 100644 --- a/templates/featureList.hamlet +++ b/templates/featureList.hamlet @@ -15,3 +15,4 @@