Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-05-25 17:42:41 +0300
committerStan Hu <stanhu@gmail.com>2015-05-26 02:51:04 +0300
commit9bcd36396b9b71467f66dd4ed79ab709bb5d027a (patch)
tree39d444294c96393beaccdd8dc0acebb4c62a6541 /app/views/projects/milestones/show.html.haml
parentbdf7b44ac36809383431d439c343b313fc7b1d90 (diff)
Refactor permission checks to use `can?` instead of `issues_enabled` and `merge_requests_enabled`
Diffstat (limited to 'app/views/projects/milestones/show.html.haml')
-rw-r--r--app/views/projects/milestones/show.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 22172a31289..5845fd744f4 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -61,11 +61,12 @@
Participants
%span.badge= @users.count
- - if can?(current_user, :write_issue, @project)
- .pull-right
+ .pull-right
+ - if can?(current_user, :write_issue, @project)
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
+ - if can?(current_user, :read_issue, @project)
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped"
.tab-content