Skip to content

Commit

Permalink
All grey for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Sep 22, 2023
1 parent 6d77a89 commit 348063d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/home_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ def vote_summary(paper, votes_by_paper)
if paper.labels.keys.include?("query-scope")
summary = ""
vote = votes_by_paper[paper.id]
summary = if vote.nil? || vote.comment?
summary = if vote.nil?
content_tag(:small, "πŸ‘(#{paper.in_scope_votes.count}) / πŸ‘Ž (#{paper.votes.out_of_scope.count})")
elsif vote.in_scope?
content_tag(:small, "πŸ‘(#{paper.in_scope_votes.count}) / <span class='grey-emoji'>πŸ‘Ž</span> (#{paper.out_of_scope_votes.count})".html_safe)
elsif vote.out_of_scope?
content_tag(:small, "<span class='grey-emoji'>πŸ‘</span>(#{paper.in_scope_votes.count}) / πŸ‘Ž (#{paper.out_of_scope_votes.count})".html_safe)
elsif vote.comment?
content_tag(:small, "<span class='grey-emoji'>πŸ‘</span>(#{paper.in_scope_votes.count}) / <span class='grey-emoji'>πŸ‘Ž</span> (#{paper.out_of_scope_votes.count})".html_safe)
end
summary.html_safe
else
Expand Down

0 comments on commit 348063d

Please sign in to comment.