diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-25 23:10:50 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-25 23:10:50 +0200 |
commit | 39fe9b644f200d4eeee30d4bc43486d177fd9b03 (patch) | |
tree | 0f3a20c03b0f36cc50bd55309d8989c46ed0ce6c /app/views/issues | |
parent | 8de19b259ec4f451852ffaaaf7f1010dc05a6c2b (diff) | |
download | gitlab-ce-39fe9b644f200d4eeee30d4bc43486d177fd9b03.tar.gz |
Add close issue to note actions bar
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/show.html.haml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index f1a97e10913..2997cde1ed2 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -6,15 +6,16 @@ = @issue.created_at.stamp("Aug 21, 2011") %span.pull-right - - if can?(current_user, :admin_project, @project) || @issue.author == current_user + - if can?(current_user, :modify_issue, @issue) - 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" - else = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" - - if can?(current_user, :admin_project, @project) || @issue.author == current_user + + - if can?(current_user, :admin_issue, @issue) = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do %i.icon-edit - Edit + Edit .pull-right .span3#votes= render 'votes/votes_block', votable: @issue @@ -55,5 +56,11 @@ = preserve do = markdown @issue.description +- content_for :note_actions do + - if can?(current_user, :modify_issue, @issue) + - if @issue.closed? + = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" + - else + = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" .voting_notes#notes= render "notes/notes_with_form" |