summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-22 10:24:44 +0000
committerRémy Coutable <remy@rymai.me>2016-02-22 11:25:20 +0100
commit31986354abc949777d24a4312340171d1cf00189 (patch)
tree3007138d9d817a96b7c288dc35c865442acfec05
parentb87cadc3c485479d38368cba1c29807c2bca1a16 (diff)
downloadgitlab-ce-31986354abc949777d24a4312340171d1cf00189.tar.gz
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
-rw-r--r--app/assets/stylesheets/pages/issues.scss2
-rw-r--r--app/views/projects/issues/_issue.html.haml12
2 files changed, 3 insertions, 11 deletions
diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss
index 1cc853dd4f5..8694bd654a7 100644
--- a/app/assets/stylesheets/pages/issues.scss
+++ b/app/assets/stylesheets/pages/issues.scss
@@ -24,7 +24,7 @@
display: inline-block;
}
- .issue-no-comments, .issue-no-votes {
+ .issue-no-comments {
opacity: 0.5;
}
}
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml
index 5b0edcfa978..654d8cd5ed0 100644
--- a/app/views/projects/issues/_issue.html.haml
+++ b/app/views/projects/issues/_issue.html.haml
@@ -16,23 +16,15 @@
= link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")
- upvotes, downvotes = issue.upvotes, issue.downvotes
- - if upvotes > 0 || downvotes > 0
+ - if upvotes > 0
%li
= icon('thumbs-up')
= upvotes
- - else
- %li{ class: 'issue-no-votes' }
- = icon('thumbs-up')
- = upvotes
- - if upvotes > 0 || downvotes > 0
+ - if downvotes > 0
%li
= icon('thumbs-down')
= downvotes
- - else
- %li{ class: 'issue-no-votes' }
- = icon('thumbs-down')
- = downvotes
- note_count = issue.notes.user.count
- if note_count > 0