diff --git a/routes b/routes index 2e8f1dd75..f7131c69f 100644 --- a/routes +++ b/routes @@ -37,6 +37,7 @@ /admin/user/#CryptoUUIDUser AdminUserR GET /admin/user/#CryptoUUIDUser/hijack AdminHijackUserR POST /info VersionR GET !free +/help HelpR GET POST !free /profile ProfileR GET POST !free !free /profile/data ProfileDataR GET POST !free !free diff --git a/src/Foundation.hs b/src/Foundation.hs index a8ebf44b8..e32503b44 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -156,7 +156,7 @@ pattern CSubmissionR tid ssh csh shn cid ptn -- Menus and Favourites data MenuItem = MenuItem { menuItemLabel :: Text - , menuItemIcon :: Maybe Text + , menuItemIcon :: Maybe Text -- currently from: https://fontawesome.com/icons?d=gallery , menuItemRoute :: Route UniWorX , menuItemAccessCallback' :: Handler Bool -- Check whether action is shown in ADDITION to authorization (which is always checked) , menuItemModal :: Bool @@ -809,6 +809,13 @@ defaultLinks = -- Define the menu items of the header. , menuItemModal = False , menuItemAccessCallback' = return True } + , NavbarRight $ MenuItem + { menuItemLabel = "Hilfe" + , menuItemIcon = Just "question" + , menuItemRoute = HelpR + , menuItemModal = True + , menuItemAccessCallback' = return True + } , NavbarRight $ MenuItem { menuItemLabel = "Profil" , menuItemIcon = Just "cogs" diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index 73aa370d2..92d9b8e1e 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -224,3 +224,18 @@ getVersionR = selectRep $ do $(widgetFile "versionHistory") provideRep $ return ($gitDescribe :: Text) + + +getHelpR :: Handler Html +getHelpR = do + -- can we get the previous route? + --who <- maybeAuth + --now <- getCurrentTime + --where <- getCurrentRoute + -- TODO: form for free input + defaultLayout $ do + [whamlet|TODO|] + +postHelpR :: Handler Html +postHelpR = getHelpR +