Commit 7bb03a53 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Hide new issue button if not authorized

parent c611ea51
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
= @issue.created_at.stamp("Aug 21, 2011") = @issue.created_at.stamp("Aug 21, 2011")
%span.pull-right %span.pull-right
= link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do - if can?(current_user, :write_issue, @project)
%i.icon-plus = link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do
New Issue %i.icon-plus
New Issue
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment