diff options
author | Stan Hu <stanhu@gmail.com> | 2015-05-25 17:42:41 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-05-26 02:51:04 +0300 |
commit | 9bcd36396b9b71467f66dd4ed79ab709bb5d027a (patch) | |
tree | 39d444294c96393beaccdd8dc0acebb4c62a6541 /app/views/projects/milestones/show.html.haml | |
parent | bdf7b44ac36809383431d439c343b313fc7b1d90 (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.haml | 5 |
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 |