diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index bc73202..2dcd449 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -848,6 +848,7 @@ instance YesodBreadcrumbs App where PublishOfferMergeR -> ("Open MR", Just HomeR) PublishMergeR -> ("Apply MR", Just HomeR) + PublishInviteR -> ("Invite someone to a resource", Just HomeR) PersonR p -> ("Person ~" <> keyHashidText p, Just HomeR) PersonInboxR p -> ("Inbox", Just $ PersonR p) diff --git a/src/Vervis/Handler/Client.hs b/src/Vervis/Handler/Client.hs index b04f50f..c63dbde 100644 --- a/src/Vervis/Handler/Client.hs +++ b/src/Vervis/Handler/Client.hs @@ -35,6 +35,9 @@ module Vervis.Handler.Client , getPublishMergeR , postPublishMergeR + + , getPublishInviteR + , postPublishInviteR ) where @@ -1156,3 +1159,44 @@ postPublishMergeR = do Right _ -> do setMessage "Apply activity sent" redirect HomeR + +inviteForm = renderDivs $ (,,) + <$> areq fedUriField "(URI) Whom to invite" Nothing + <*> areq fedUriField "(URI) Resource" Nothing + <*> areq capField "(URI) Grant activity to use for authorization" Nothing + +getPublishInviteR :: Handler Html +getPublishInviteR = do + ((_, widget), enctype) <- runFormPost inviteForm + defaultLayout + [whamlet| +