Role diagram for repo roles too

This commit is contained in:
fr33domlover 2016-07-02 09:57:52 +00:00
parent 13afd17a40
commit c292bd51a4
2 changed files with 14 additions and 9 deletions

View file

@ -56,10 +56,13 @@ import Vervis.Widget.Role
getRepoRolesR :: ShrIdent -> Handler Html
getRepoRolesR shr = do
roles <- runDB $ do
Entity sid _ <- getBy404 $ UniqueSharer shr
selectList [RepoRoleSharer ==. sid] []
defaultLayout $(widgetFile "repo/role/list")
--roles <- runDB $ do
-- Entity sid _ <- getBy404 $ UniqueSharer shr
-- selectList [RepoRoleSharer ==. sid] []
graph <- runDB $ do
Entity sid _s <- getBy404 $ UniqueSharer shr
getRepoRoleGraph sid
defaultLayout $(widgetFile "repo/role/graph")
postRepoRolesR :: ShrIdent -> Handler Html
postRepoRolesR shr = do

View file

@ -15,8 +15,10 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
<p>
<a href=@{RepoRoleNewR shr}>New…
<ul>
$forall Entity _rid role <- roles
<li>
<a href=@{RepoRoleR shr $ repoRoleIdent role}>
#{rl2text $ repoRoleIdent role}
^{repoRoleGraphW shr graph}
$#<ul>
$# $forall Entity _rid role <- roles
$# <li>
$# <a href=@{RepoRoleR shr $ repoRoleIdent role}>
$# #{rl2text $ repoRoleIdent role}