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")