1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 18:54:53 +09:00

Remove per-handler titles from project handlers

This commit is contained in:
fr33domlover 2016-05-13 22:07:56 +00:00
parent 3c95014087
commit 418d3fd9d2

View file

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