From 418d3fd9d265a158ca26af0a93ecadea35159bdb Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Fri, 13 May 2016 22:07:56 +0000 Subject: [PATCH] Remove per-handler titles from project handlers --- src/Vervis/Handler/Project.hs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Vervis/Handler/Project.hs b/src/Vervis/Handler/Project.hs index b8bfb70..ed0405b 100644 --- a/src/Vervis/Handler/Project.hs +++ b/src/Vervis/Handler/Project.hs @@ -38,9 +38,7 @@ getProjectsR ident = do sharer ^. SharerId ==. project ^. ProjectSharer orderBy [asc $ project ^. ProjectIdent] return $ project ^. ProjectIdent - defaultLayout $ do - setTitle $ toHtml $ "Vervis > People > " <> ident <> " > Projects" - $(widgetFile "project/projects") + defaultLayout $(widgetFile "project/projects") postProjectsR :: Text -> Handler Html postProjectsR ident = do @@ -51,11 +49,11 @@ postProjectsR ident = do FormSuccess project -> do runDB $ insert_ project setMessage "Project added." - redirectUltDest HomeR + redirect HomeR FormMissing -> do setMessage "Field(s) missing" defaultLayout $(widgetFile "project/project-new") - FormFailure l_ -> do + FormFailure _l -> do setMessage "Project creation failed, see below" defaultLayout $(widgetFile "project/project-new") @@ -64,9 +62,7 @@ getProjectNewR ident = do Entity _pid person <- requireAuth let sid = personIdent person ((_result, widget), enctype) <- runFormPost $ newProjectForm sid - defaultLayout $ do - setTitle $ toHtml $ "Vervis > People > " <> ident <> " > New Project" - $(widgetFile "project/project-new") + defaultLayout $(widgetFile "project/project-new") getProjectR :: Text -> Text -> Handler Html getProjectR user proj = do @@ -74,11 +70,4 @@ getProjectR user proj = do Entity sid _s <- getBy404 $ UniqueSharerIdent user Entity _pid p <- getBy404 $ UniqueProject proj sid return p - defaultLayout $ do - setTitle $ toHtml $ mconcat - [ "Vervis > People > " - , user - , " > Project > " - , proj - ] - $(widgetFile "project/project") + defaultLayout $(widgetFile "project/project")