prey/gdpr_rails

View on GitHub
app/views/policy_manager/categories/index.html.erb

Summary

Maintainability
Test Coverage
<h2><%= I18n.t("terms_app.categories.index.title") %></h2>

<div class="row">
  <div class="col-12">
    <div class="card">
      <%= chart ->{PolicyManager::UserTerm.group_by_day(:created_at, format: "%a").count} %> 
    </div>
  </div>
</div>


<div class="card">

  <div class="card-header">
    <h3 class="card-title">
      <%= I18n.t("terms_app.categories.index.title") %>
    </h3>
  </div>

  <div class="table-responsive">
    <table class="table card-table table-vcenter text-nowrap">
    <thead>
      <tr>
        <th><%= I18n.t("terms_app.categories.index.table.name") %></th>
        <th><%= I18n.t("terms_app.categories.index.table.terms") %></th>
        <th colspan="1"></th>
      </tr>
    </thead>

    <tbody>
      <% @categories.each do |category| %>
        <tr>
          <td><%= category.name %></td>
          <td><%= category.terms.size %></td>
          <td><%= link_to I18n.t("terms_app.categories.index.table.show"), category_path(category.name), class: "btn btn-secondary btn-sm" %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
  </div>

  
</div>