mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-01-10 16:46:46 +09:00
Role diagram for repo roles too
This commit is contained in:
parent
13afd17a40
commit
c292bd51a4
2 changed files with 14 additions and 9 deletions
|
@ -56,10 +56,13 @@ import Vervis.Widget.Role
|
||||||
|
|
||||||
getRepoRolesR :: ShrIdent -> Handler Html
|
getRepoRolesR :: ShrIdent -> Handler Html
|
||||||
getRepoRolesR shr = do
|
getRepoRolesR shr = do
|
||||||
roles <- runDB $ do
|
--roles <- runDB $ do
|
||||||
Entity sid _ <- getBy404 $ UniqueSharer shr
|
-- Entity sid _ <- getBy404 $ UniqueSharer shr
|
||||||
selectList [RepoRoleSharer ==. sid] []
|
-- selectList [RepoRoleSharer ==. sid] []
|
||||||
defaultLayout $(widgetFile "repo/role/list")
|
graph <- runDB $ do
|
||||||
|
Entity sid _s <- getBy404 $ UniqueSharer shr
|
||||||
|
getRepoRoleGraph sid
|
||||||
|
defaultLayout $(widgetFile "repo/role/graph")
|
||||||
|
|
||||||
postRepoRolesR :: ShrIdent -> Handler Html
|
postRepoRolesR :: ShrIdent -> Handler Html
|
||||||
postRepoRolesR shr = do
|
postRepoRolesR shr = do
|
||||||
|
|
|
@ -15,8 +15,10 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
<p>
|
<p>
|
||||||
<a href=@{RepoRoleNewR shr}>New…
|
<a href=@{RepoRoleNewR shr}>New…
|
||||||
|
|
||||||
<ul>
|
^{repoRoleGraphW shr graph}
|
||||||
$forall Entity _rid role <- roles
|
|
||||||
<li>
|
$#<ul>
|
||||||
<a href=@{RepoRoleR shr $ repoRoleIdent role}>
|
$# $forall Entity _rid role <- roles
|
||||||
#{rl2text $ repoRoleIdent role}
|
$# <li>
|
||||||
|
$# <a href=@{RepoRoleR shr $ repoRoleIdent role}>
|
||||||
|
$# #{rl2text $ repoRoleIdent role}
|
Loading…
Reference in a new issue