Only show up or down votes icon on issue list if there are any
Closes #13649
This commit is contained in:
parent
04d1b41258
commit
d8069bd858
2 changed files with 3 additions and 11 deletions
|
@ -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 @@
|
||||||
= 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
|
||||||
|
|
Loading…
Reference in a new issue