Commit 31986354 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-zero-votes-showing-on-issue-list' into 'master'

Only show up or down votes icon on issue list if there are any

Closes #13649 

![Screen_Shot_2016-02-22_at_10.20.27](/uploads/21477426856dab9731bb110032025867/Screen_Shot_2016-02-22_at_10.20.27.png)

See merge request !2909
parent b87cadc3
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
display: inline-block; display: inline-block;
} }
.issue-no-comments, .issue-no-votes { .issue-no-comments {
opacity: 0.5; opacity: 0.5;
} }
} }
......
...@@ -16,23 +16,15 @@ ...@@ -16,23 +16,15 @@
= link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name") = link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")
- upvotes, downvotes = issue.upvotes, issue.downvotes - upvotes, downvotes = issue.upvotes, issue.downvotes
- if upvotes > 0 || downvotes > 0 - if upvotes > 0
%li %li
= icon('thumbs-up') = icon('thumbs-up')
= upvotes = upvotes
- else
%li{ class: 'issue-no-votes' }
= icon('thumbs-up')
= upvotes
- if upvotes > 0 || downvotes > 0 - if downvotes > 0
%li %li
= icon('thumbs-down') = icon('thumbs-down')
= downvotes = downvotes
- else
%li{ class: 'issue-no-votes' }
= icon('thumbs-down')
= downvotes
- note_count = issue.notes.user.count - note_count = issue.notes.user.count
- if note_count > 0 - if note_count > 0
......
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