<%- title @title %>
<%- description @description %>

<div class="sidebarred">
  <div class="sidebarred-main-content">
    <div class="open-sidebar sidebar-collapsed">
      ☰
    </div>

    <div class="user-list-header">
      <h2><%= t('users.listing_title') %></h2>
    </div>

    <% if @users.empty? %>
      <p>No users!</p>
    <% else %>
      <ol id="browse-user-list" class="user-list">
        <%= render partial: 'user', collection: @users, locals: {script_counts: @user_script_counts} %>
      </ol>
      <% if current_user&.moderator? && params[:same_ip] %>
        <%= link_to 'Ban all users with this IP as spammers', ban_with_ip_users_path(same_ip: params[:same_ip]), data: { turbo: true, turbo_method: :POST, turbo_confirm: "Ban all users with this IP as spammers, deleting all scripts and comments? Only do this if it's blatant and you're very sure." } %>
      <% end %>
    <% end %>

    <%= render_pagination %>
  </div>
  <div class="sidebar collapsed">
    <div class="close-sidebar">
      <div class="sidebar-title"><%= t('common.listing_options_title') %></div>
      <div>☰</div>
    </div>
    <%= render partial: 'list_options' %>
  </div>
</div>
