comment: show downvote summaries to moderators

This commit is contained in:
joshua stein 2015-02-07 12:23:51 -06:00
parent 73eb9ae662
commit 270401db3f

View file

@ -78,12 +78,13 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% end %>
<span class="reason">
<% if comment.downvotes > 0 && comment.score <= 0 &&
comment.user_id == @user.try(:id) %>
<% if comment.downvotes > 0 &&
((comment.score <= 0 && comment.user_id == @user.try(:id)) ||
@user.try("is_moderator?")) %>
| <%= comment.vote_summary.downcase %>
<% elsif comment.current_vote && comment.current_vote[:vote] == -1 %>
| <%= Vote::COMMENT_REASONS[comment.current_vote[:reason]].downcase
%>
| -1
<%= Vote::COMMENT_REASONS[comment.current_vote[:reason]].downcase %>
<% end %>
</span>
<% end %>