comments: let mods click score to see votes.

This commit is contained in:
evazion
2021-01-22 04:26:55 -06:00
parent bed5fdafb8
commit 2eecf4d695
5 changed files with 50 additions and 10 deletions

View File

@@ -53,7 +53,13 @@
<%= link_to upvote_icon, comment_comment_votes_path(comment_id: comment.id, score: "1"), class: "comment-upvote-link inactive-link", method: :post, remote: true %>
<% end %>
<span class="comment-score"><%= comment.score %></span>
<% if policy(CommentVote).can_see_votes? %>
<%= link_to comment_votes_path(search: { comment_id: comment.id }, variant: "compact"), class: "inactive-link" do %>
<span class="comment-score"><%= comment.score %></span>
<% end %>
<% else %>
<span class="comment-score"><%= comment.score %></span>
<% end %>
<% if current_user.is_anonymous? %>
<%= link_to downvote_icon, login_path(url: request.fullpath), class: "comment-downvote-link inactive-link" %>