diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index f68710517..e3576c5e4 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -27,6 +27,9 @@ InvalidInput: Eingaben bitte korrigieren. Term: Semester TermPlaceholder: W/S + vierstellige Jahreszahl +SchoolListHeading: Übersicht über verwaltete Institute +SchoolHeading school@SchoolName: Übersicht #{display school} + LectureStart: Beginn Vorlesungen Course: Kurs diff --git a/src/Foundation.hs b/src/Foundation.hs index 90371f955..88a4cad75 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -995,6 +995,13 @@ pageHeading (TermSchoolCourseListR tid ssh) School{schoolName=school} <- handlerToWidget $ runDB $ get404 ssh i18nHeading $ MsgTermSchoolCourseListHeading tid school +pageHeading (SchoolListR) + = Just $ i18nHeading MsgSchoolListHeading +pageHeading (SchoolShowR ssh) + = Just $ do + School{schoolName=school} <- handlerToWidget $ runDB $ get404 ssh + i18nHeading $ MsgSchoolHeading school + pageHeading (CourseListR) = Just $ i18nHeading $ MsgCourseListTitle pageHeading CourseNewR diff --git a/src/Handler/Profile.hs b/src/Handler/Profile.hs index 8c6d40a49..20fd64af5 100644 --- a/src/Handler/Profile.hs +++ b/src/Handler/Profile.hs @@ -195,7 +195,7 @@ getProfileDataR = do -- mr <- getMessageRender -- Tabelle mit eigenen Kursen - ownCourseTable <- do + ownCourseTable <- do -- TODO: only display when non-empty let procData :: ((E.SqlExpr (Entity Course) `E.InnerJoin` E.SqlExpr (Entity Lecturer)) -> a) -> ((E.SqlExpr (Entity Course) `E.InnerJoin` E.SqlExpr (Entity Lecturer)) -> a) procData = id @@ -277,10 +277,17 @@ getProfileDataR = do } -- Tabelle mit allen Abgaben und Abgabe-Gruppen - -- Tabelle mit allen Korrektor-Aufgaben + submissionTable <- do + let procData :: ((_)->a) + -> ((_)->a) + procData = id + return () -- Tabelle mit allen Tutorials + tutorialTable <- return [whamlet| TOOD: Tutorials anzeigen |] -- TODO + -- Tabelle mit allen Korrektor-Aufgaben + correctorTable <- return [whamlet| TOOD: Korrekturen anzeigen |] -- TODO -- Tabelle mit allen Klausuren und Noten - + examTable <- return [whamlet| TOOD: Klausuranmeldungen anzeigen |] -- TODO defaultLayout $ do $(widgetFile "profileData") $(widgetFile "dsgvDisclaimer") diff --git a/src/Handler/Utils/Table/Convenience.hs b/src/Handler/Utils/Table/Convenience.hs index de0169257..f3c6627d5 100644 --- a/src/Handler/Utils/Table/Convenience.hs +++ b/src/Handler/Utils/Table/Convenience.hs @@ -17,6 +17,7 @@ import qualified Database.Esqueleto as E (Value(..)) -- newtype CourseLink = CourseLink (TermId, SchoolId, CourseId, CourseShorthand) -- cannot be in Types due to CourseId type CourseLink = (TermId, SchoolId, CourseId, CourseShorthand) -- cannot be in Types due to CourseId +-- TODO: can we get rid of this type through lenses? type CourseLink' = (E.Value TermId, E.Value SchoolId, E.Value CourseId, E.Value CourseShorthand) -- cannot be in Types due to CourseId diff --git a/templates/profileData.hamlet b/templates/profileData.hamlet index 091daee66..6b74fb278 100644 --- a/templates/profileData.hamlet +++ b/templates/profileData.hamlet @@ -18,6 +18,21 @@