diff --git a/messages/de.msg b/messages/de.msg index 5332201d5..a4e8637fa 100644 --- a/messages/de.msg +++ b/messages/de.msg @@ -49,3 +49,4 @@ SubmissionAlreadyExistsFor user@Text: #{user} hat bereits eine Abgabe zu diesem EMailUnknown email@Text: E-Mail #{email} gehört zu keinem bekannten Benutzer. NotAParticipant user@Text tid@TermIdentifier csh@Text: #{user} ist nicht im Kurs #{termToText tid}-#{csh} angemeldet. +HomeHeading: Startseite \ No newline at end of file diff --git a/src/Foundation.hs b/src/Foundation.hs index 70c4327a5..c6a43c77b 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -434,13 +434,14 @@ instance Yesod UniWorX where -- value passed to hamletToRepHtml cannot be a widget, this allows -- you to use normal widget features in default-layout. + let navbar :: Widget navbar = $(widgetFile "widgets/navbar") asidenav :: Widget asidenav = $(widgetFile "widgets/asidenav") - contentHeadline :: Maybe String - contentHeadline = Just "Some Headline" -- should be coming from the currently viewed page + contentHeadline :: Maybe Widget + contentHeadline = pageHeading =<< mcurrentRoute breadcrumbs :: Widget breadcrumbs = $(widgetFile "widgets/breadcrumbs") pageactionprime :: Widget @@ -686,6 +687,12 @@ pageActions (TermCourseListR _) = pageActions _ = [] +pageHeading :: Route UniWorx -> Maybe Widget +pageHeading HomeR + = Just [whamlet|_{MsgHomeHeading}|] +pageHeading _ + = Nothing + defaultLinks :: [MenuTypes] defaultLinks = -- Define the menu items of the header. [ NavbarRight $ MenuItem diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 99b24bfca..165096dfd 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -14,8 +14,9 @@