From d8069bd85863ab8c47d2bb2370221b17fb686b93 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 22 Feb 2016 10:21:02 +0000 Subject: [PATCH] Only show up or down votes icon on issue list if there are any Closes #13649 --- app/assets/stylesheets/pages/issues.scss | 2 +- app/views/projects/issues/_issue.html.haml | 12 ++---------- 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