From 50d27ad34dd6de45a73706c77252df5c75e1b0c6 Mon Sep 17 00:00:00 2001 From: George Vinogradov Date: Mon, 13 Feb 2012 20:16:50 +0400 Subject: [PATCH] [issue #171] Added ACL calls to project navigation. --- app/views/git/shared/_navigation.html.haml | 5 +++-- app/views/projects/show.html.haml | 3 ++- app/views/wiki/_project_short.html.haml | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/git/shared/_navigation.html.haml b/app/views/git/shared/_navigation.html.haml index e09fcb051..fcd292c06 100644 --- a/app/views/git/shared/_navigation.html.haml +++ b/app/views/git/shared/_navigation.html.haml @@ -4,7 +4,8 @@ %li= link_to t("layout.projects.new"), new_project_path %li= link_to t("layout.projects.show"), project_path(@project) %li.active= link_to t("layout.git.repositories.source"), project_repo_path(@project) - %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) + - if can? :write, @project + %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) %ul#git_submenu.sub-wat-cf.wat-cf %li= link_to t("layout.git.repositories.commits"), commits_path(@project, :treeish => @treeish) @@ -25,4 +26,4 @@ %span.current= tag.name - else = link_to tag.name, tree_path(@project, :treeish => tag.name) - .clear \ No newline at end of file + .clear diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index cab48a9b3..30af680c4 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -5,7 +5,8 @@ %li= link_to t("layout.projects.new"), new_project_path %li.active= link_to t("layout.projects.show"), project_path(@project) %li= link_to t("layout.git.repositories.source"), project_repo_path(@project) - %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) + - if can? :write, @project + %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) %li= link_to t("layout.projects.issues"), project_issues_path(@project) - if @project.has_wiki %li= link_to t("layout.projects.wiki"), project_wiki_index_path(@project) diff --git a/app/views/wiki/_project_short.html.haml b/app/views/wiki/_project_short.html.haml index 4697ab479..258ea3373 100644 --- a/app/views/wiki/_project_short.html.haml +++ b/app/views/wiki/_project_short.html.haml @@ -5,7 +5,8 @@ %li= link_to t("layout.projects.new"), new_project_path %li= link_to t("layout.projects.show"), project_path(@project) %li= link_to t("layout.git.repositories.source"), project_repo_path(@project) - %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) + - if can? :write, @project + %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) %li= link_to t("layout.projects.issues"), project_issues_path(@project) %li.active= link_to t("layout.projects.wiki"), project_wiki_index_path(@project)