diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-11 23:08:19 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-11 23:08:19 -0700 |
commit | 40eec08c99fe29963afed0f073b7bdbbfe31ac59 (patch) | |
tree | d4779b49b29c91cd65162e7a5e9ea875b7e3c8ba /app/views/issues | |
parent | d8f6d38d39868426902ffbad9c232b7748a4288f (diff) | |
parent | 0bfcc574b660108646bd2c99a611163a0c847251 (diff) | |
download | gitlab-ce-40eec08c99fe29963afed0f073b7bdbbfe31ac59.tar.gz |
Merge pull request #1409 from riyad/update-votes
Update votes for issues and merge requests
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_show.html.haml | 4 | ||||
-rw-r--r-- | app/views/issues/show.html.haml | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index 8500cd40a6e..22101aa1dce 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -34,5 +34,5 @@ - else - - if issue.upvotes > 0 - %span.badge.badge-success= "+#{issue.upvotes}" + - if issue.votes_count > 0 + = render 'votes/votes_inline', votable: issue diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index dce8cf6a59d..9b1c72a3a12 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -8,22 +8,22 @@ %span.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 small" + = link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put, class: "btn grouped success" - else - = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn small", title: "Close Issue" + = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn grouped danger", title: "Close Issue" - if can?(current_user, :admin_project, @project) || @issue.author == current_user - = link_to edit_project_issue_path(@project, @issue), class: "btn small" do + = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do %i.icon-edit Edit - %br - - if @issue.upvotes > 0 - .upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}" +.right + .span3#votes= render 'votes/votes_block', votable: @issue .back_link = link_to project_issues_path(@project) do ← To issues list + .main_box .top_box_content %h4 |