consul/consul

View on GitHub
app/views/admin/hidden_users/index.html.erb

Summary

Maintainability
Test Coverage
<h2><%= t("admin.hidden_users.index.title") %></h2>
<%= render "admin/shared/user_search", url: admin_hidden_users_path %>
<p><%= t("admin.shared.moderated_content") %></p>

<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_users.index" %>

<% if @users.any? %>
  <h3><%= page_entries_info @users %></h3>

  <table>
    <thead>
      <th scope="col" class="small-8"><%= t("admin.hidden_users.index.user") %></th>
      <th scope="col"><%= t("admin.shared.actions") %></th>
    </thead>
    <tbody>
    <% @users.each do |user| %>
      <tr id="<%= dom_id(user) %>">
        <td>
          <p><%= link_to user.name, admin_hidden_user_path(user) %></p>
        </td>

        <td>
          <%= render Admin::HiddenTableActionsComponent.new(user) %>
        </td>
      </tr>
    <% end %>
    </tbody>
  </table>

  <%= paginate @users %>
<% else %>
 <div class="callout primary margin">
    <%= t("admin.hidden_users.index.no_hidden_users") %>
  </div>
<% end %>