Added highlighting and notices for moderators
- Posts and topics have an added moderation_reports function -- This is so all moderation reports can be loaded in a single query - Those moderation reports are passed into the render functions separately -- This is so the individual comments/posts don't have to be queried
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
<div id="a-show">
|
||||
<h1><%= link_to_user @user %></h1>
|
||||
|
||||
<% if !@user.is_moderator? && CurrentUser.is_moderator? && @user.moderation_reports.any? %>
|
||||
<div class="moderation-users-notice">
|
||||
<span class="info" id="moderation-users-notice-for-<%= @user.id %>">
|
||||
This user has been reported for moderation! (<%= @user.moderation_reports.count %> <%= (@user.moderation_reports.count == 1 ? "report" : "reports") %>)
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "statistics", presenter: @user.presenter, user: @user %>
|
||||
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
|
||||
Reference in New Issue
Block a user