mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-29 18:04:51 +09:00
Remove per-handler titles from project handlers
This commit is contained in:
parent
3c95014087
commit
418d3fd9d2
1 changed files with 5 additions and 16 deletions
|
@ -38,9 +38,7 @@ getProjectsR ident = do
|
||||||
sharer ^. SharerId ==. project ^. ProjectSharer
|
sharer ^. SharerId ==. project ^. ProjectSharer
|
||||||
orderBy [asc $ project ^. ProjectIdent]
|
orderBy [asc $ project ^. ProjectIdent]
|
||||||
return $ project ^. ProjectIdent
|
return $ project ^. ProjectIdent
|
||||||
defaultLayout $ do
|
defaultLayout $(widgetFile "project/projects")
|
||||||
setTitle $ toHtml $ "Vervis > People > " <> ident <> " > Projects"
|
|
||||||
$(widgetFile "project/projects")
|
|
||||||
|
|
||||||
postProjectsR :: Text -> Handler Html
|
postProjectsR :: Text -> Handler Html
|
||||||
postProjectsR ident = do
|
postProjectsR ident = do
|
||||||
|
@ -51,11 +49,11 @@ postProjectsR ident = do
|
||||||
FormSuccess project -> do
|
FormSuccess project -> do
|
||||||
runDB $ insert_ project
|
runDB $ insert_ project
|
||||||
setMessage "Project added."
|
setMessage "Project added."
|
||||||
redirectUltDest HomeR
|
redirect HomeR
|
||||||
FormMissing -> do
|
FormMissing -> do
|
||||||
setMessage "Field(s) missing"
|
setMessage "Field(s) missing"
|
||||||
defaultLayout $(widgetFile "project/project-new")
|
defaultLayout $(widgetFile "project/project-new")
|
||||||
FormFailure l_ -> do
|
FormFailure _l -> do
|
||||||
setMessage "Project creation failed, see below"
|
setMessage "Project creation failed, see below"
|
||||||
defaultLayout $(widgetFile "project/project-new")
|
defaultLayout $(widgetFile "project/project-new")
|
||||||
|
|
||||||
|
@ -64,9 +62,7 @@ getProjectNewR ident = do
|
||||||
Entity _pid person <- requireAuth
|
Entity _pid person <- requireAuth
|
||||||
let sid = personIdent person
|
let sid = personIdent person
|
||||||
((_result, widget), enctype) <- runFormPost $ newProjectForm sid
|
((_result, widget), enctype) <- runFormPost $ newProjectForm sid
|
||||||
defaultLayout $ do
|
defaultLayout $(widgetFile "project/project-new")
|
||||||
setTitle $ toHtml $ "Vervis > People > " <> ident <> " > New Project"
|
|
||||||
$(widgetFile "project/project-new")
|
|
||||||
|
|
||||||
getProjectR :: Text -> Text -> Handler Html
|
getProjectR :: Text -> Text -> Handler Html
|
||||||
getProjectR user proj = do
|
getProjectR user proj = do
|
||||||
|
@ -74,11 +70,4 @@ getProjectR user proj = do
|
||||||
Entity sid _s <- getBy404 $ UniqueSharerIdent user
|
Entity sid _s <- getBy404 $ UniqueSharerIdent user
|
||||||
Entity _pid p <- getBy404 $ UniqueProject proj sid
|
Entity _pid p <- getBy404 $ UniqueProject proj sid
|
||||||
return p
|
return p
|
||||||
defaultLayout $ do
|
defaultLayout $(widgetFile "project/project")
|
||||||
setTitle $ toHtml $ mconcat
|
|
||||||
[ "Vervis > People > "
|
|
||||||
, user
|
|
||||||
, " > Project > "
|
|
||||||
, proj
|
|
||||||
]
|
|
||||||
$(widgetFile "project/project")
|
|
||||||
|
|
Loading…
Reference in a new issue