diff options
author | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 13:10:58 +0400 |
---|---|---|
committer | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 14:43:50 +0400 |
commit | 1644117a1ac45bd7d250e7bced929a00a3befe5e (patch) | |
tree | 8cc9ac92f9156bc4327ac1ec49cdc6b56b3dc49e /app/views/issues | |
parent | 0b512af803d007852bcba40c75203e0e45dda177 (diff) | |
download | gitlab-ce-1644117a1ac45bd7d250e7bced929a00a3befe5e.tar.gz |
Issue uses StateMachine now
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_show.html.haml | 6 | ||||
-rw-r--r-- | app/views/issues/show.html.haml | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index fa888618066..b078115a5f5 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -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 diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 474955cc665..ab10d619cae 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -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) |