Commit 39fe9b64 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add close issue to note actions bar

parent 8de19b25
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
= @issue.created_at.stamp("Aug 21, 2011") = @issue.created_at.stamp("Aug 21, 2011")
%span.pull-right %span.pull-right
- if can?(current_user, :admin_project, @project) || @issue.author == current_user - 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"
- else - 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" = 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 = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
%i.icon-edit %i.icon-edit
Edit Edit
...@@ -55,5 +56,11 @@ ...@@ -55,5 +56,11 @@
= preserve do = preserve do
= markdown @issue.description = 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" .voting_notes#notes= render "notes/notes_with_form"
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
.note-form-actions .note-form-actions
.buttons .buttons
= f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button" = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button"
= yield(:note_actions)
%a.btn.grouped.js-close-discussion-note-form Cancel %a.btn.grouped.js-close-discussion-note-form Cancel
.note-form-option .note-form-option
......
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