Platoniq/decidim-verifications-direct_verifications

View on GitHub
app/views/decidim/direct_verifications/verification/admin/stats/index.html.erb

Summary

Maintainability
Test Coverage
<div class="card">
  <div class="card-divider">
    <h2 class="card-title">
      <%= t("admin.index.stats", scope: "decidim.direct_verifications.verification") %>
      <% unless request.xhr? %>
        <%= link_to t("admin.index.title", scope: "decidim.direct_verifications.verification"), direct_verifications_path, class: "button tiny button--title" %>
      <% end %>
    </h2>
  </div>
  <div class="card-section">
    <table class="table-list">
      <thead>
        <tr>
          <th><%= t("admin.new.authorization_handler", scope: "decidim.direct_verifications.verification") %></th>
          <th><%= t(".registered") %></th>
          <th><%= t(".authorized") %></th>
          <th><%= t(".unconfirmed") %></th>
          <th><%= t(".authorized_unconfirmed") %></th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <% @stats.each do |a, s| %>
        <tr>
          <td>
            <%= a %>
          </td>
          <td><%= s[:registered] %></td>
          <td><%= s[:authorized] %></td>
          <td><%= s[:unconfirmed] %></td>
          <td><%= s[:authorized_unconfirmed] %></td>
        </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>