Skip to content
Snippets Groups Projects
Commit 045f5c89 authored by Monica Cellio's avatar Monica Cellio
Browse files

moved message count into mod menu

parent 69906b74
No related merge requests found
...@@ -64,14 +64,18 @@ ...@@ -64,14 +64,18 @@
<% end %> <% end %>
<% end %> <% end %>
<% if current_user&.is_moderator %> <% if current_user&.is_moderator %>
<a href="<%= mod_user_path(@user) %>" class="button is-danger is-outlined is-small" data-drop="#mod-tools-drop"><i class="fas fa-shield-alt"></i> Moderator Tools</a> <a href="<%= mod_user_path(@user) %>" class="button is-danger is-outlined is-small" data-drop="#mod-tools-drop"><i class="fas fa-shield-alt"></i> Moderator Tools <% if @user.community_user.mod_warnings&.size.positive? %> (<%= pluralize(@user.community_user.mod_warnings.count, 'message') %>) <% end %></a>
<div class="droppanel" id="mod-tools-drop"> <div class="droppanel" id="mod-tools-drop">
<div class="droppanel--header">quick actions</div> <div class="droppanel--header">quick actions</div>
<div class="droppanel--menu"> <div class="droppanel--menu">
<a href="/users/<%= @user.id %>/mod/activity-log">full activity log</a> <a href="/users/<%= @user.id %>/mod/activity-log">full activity log</a>
<a href="/users/<%= @user.id %>/mod/annotations">annotations on user</a> <a href="/users/<%= @user.id %>/mod/annotations">annotations on user</a>
<a href="/users/<%= @user.id %>/mod/privileges">privileges</a> <a href="/users/<%= @user.id %>/mod/privileges">privileges</a>
<a href="/warning/log/<%= @user.id %>">warnings and suspensions sent to user <% if @user.community_user.suspended? %><em>(includes lifting the suspension)</em><% end %></a> <a href="/warning/log/<%= @user.id %>">warnings and suspensions sent to user
<% if @user.community_user.suspended? %><em>(includes lifting the suspension)</em>
<% elsif @user.community_user.mod_warnings&.size.positive? %>
(latest <%= time_ago_in_words(@user.community_user.latest_warning) %> ago)
<% end %></a>
<a href="/warning/new/<%= @user.id %>">warn or suspend user</a> <a href="/warning/new/<%= @user.id %>">warn or suspend user</a>
</div> </div>
<div class="h-m-t-6"> <div class="h-m-t-6">
...@@ -86,14 +90,6 @@ ...@@ -86,14 +90,6 @@
<% end %> <% end %>
</div> </div>
<% if moderator? && @user.community_user.mod_warnings&.size.positive? %>
<div class="notice is-info h-m-b-4">
<p><%= pluralize(@user.community_user.mod_warnings.count, 'message') %> sent,
most recent: <%= time_ago_in_words(@user.community_user.latest_warning) %> ago
</p>
</div>
<% end %>
<div class="user-profile-heading-container"> <div class="user-profile-heading-container">
<h2 class="user-profile-heading">Posts</h2> <h2 class="user-profile-heading">Posts</h2>
<% if @posts.size > 0 %> <% if @posts.size > 0 %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment