From c292bd51a4b2a2ee5d93e2cccfd66ef5f52ddd11 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sat, 2 Jul 2016 09:57:52 +0000 Subject: [PATCH] Role diagram for repo roles too --- src/Vervis/Handler/Role.hs | 11 +++++++---- templates/repo/role/{list.hamlet => graph.hamlet} | 12 +++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) rename templates/repo/role/{list.hamlet => graph.hamlet} (75%) diff --git a/src/Vervis/Handler/Role.hs b/src/Vervis/Handler/Role.hs index 70665af..5bf7b37 100644 --- a/src/Vervis/Handler/Role.hs +++ b/src/Vervis/Handler/Role.hs @@ -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 diff --git a/templates/repo/role/list.hamlet b/templates/repo/role/graph.hamlet similarity index 75% rename from templates/repo/role/list.hamlet rename to templates/repo/role/graph.hamlet index 693a02d..dcde87c 100644 --- a/templates/repo/role/list.hamlet +++ b/templates/repo/role/graph.hamlet @@ -15,8 +15,10 @@ $# .

New… -