docbrown/app/views/admin/users/_activity.html.erb
Arit Amana 845e00797b
[EOY 2020] Replace "ban" with "suspend" in Admin (#11581)
* Implement changes

* display "Suspended" if user role.name is banned

* Correct equality symbol

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2020-11-25 09:15:07 -05:00

26 lines
800 B
Text

<div class="row">
<div class="col-sm-6">
<h2>Activity</h2>
<ul>
<li><%= @user.comments_count %> comments</li>
<li><%= @user.articles_count %> articles</li>
<li><%= @user.reactions_count %> reactions</li>
<li><%= @user.followers_count %> followers</li>
<li><%= @user.following_users_count %> users following</li>
<li><%= @user.badge_achievements_count %> badges</li>
</ul>
</div>
<div class="col-sm-6">
<h2>Current Roles</h2>
<p>(view full history in notes below)</p>
<ul>
<% @user.roles.each do |role| %>
<% if role.name == "banned" %>
<li>suspended</li>
<% else %>
<li><%= role.name %> <em><%= role.resource_name.to_s %></em></li>
<% end %>
<% end %>
</ul>
</div>
</div>