Issue uses StateMachine now
This commit is contained in:
parent
0b512af803
commit
1644117a1a
13 changed files with 144 additions and 145 deletions
|
@ -8,10 +8,10 @@
|
|||
%i.icon-comment
|
||||
= issue.notes.count
|
||||
- if can? current_user, :modify_issue, issue
|
||||
- if issue.closed
|
||||
= link_to 'Reopen', project_issue_path(issue.project, issue, issue: {closed: false }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
|
||||
- if issue.closed?
|
||||
= link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state: :reopened }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
|
||||
- else
|
||||
= link_to 'Close', project_issue_path(issue.project, issue, issue: {closed: true }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
|
||||
= link_to 'Close', project_issue_path(issue.project, issue, issue: {state: :closed }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
|
||||
= link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do
|
||||
%i.icon-edit
|
||||
Edit
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
%span.pull-right
|
||||
- if can?(current_user, :admin_project, @project) || @issue.author == current_user
|
||||
- if @issue.closed
|
||||
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put, class: "btn grouped reopen_issue"
|
||||
- if @issue.closed?
|
||||
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {state: :reopened }, status_only: true), method: :put, class: "btn grouped reopen_issue"
|
||||
- else
|
||||
= link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
|
||||
= link_to 'Close', project_issue_path(@project, @issue, issue: {state: :closed }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
|
||||
- if can?(current_user, :admin_project, @project) || @issue.author == current_user
|
||||
= link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
|
||||
%i.icon-edit
|
||||
|
@ -27,7 +27,7 @@
|
|||
.ui-box.ui-box-show
|
||||
.ui-box-head
|
||||
%h4.box-title
|
||||
- if @issue.closed
|
||||
- if @issue.closed?
|
||||
.error.status_info Closed
|
||||
= gfm escape_once(@issue.title)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue