app/views/policy_manager/categories/show.html.erb
<div class="float-right">
<%= link_to I18n.t("terms_app.misc.back"), categories_path, class: " btn btn-primary" %>
<%= link_to I18n.t("terms_app.categories.show.new"), new_category_term_path(@category.name), class: " btn btn-success"%>
</div>
<h2>
<%= I18n.t("terms_app.categories.show.title", name: @category.name) %>
</h2>
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table card-table table-vcenter text-nowrap">
<thead>
<tr>
<th><%= I18n.t("terms_app.categories.show.table.id") %></th>
<th><%= I18n.t("terms_app.categories.show.table.content") %></th>
<th><%= I18n.t("terms_app.categories.show.table.state") %></th>
<th><%= I18n.t("terms_app.categories.show.table.updated_at") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% @terms.each do |term| %>
<tr>
<td><%= term.id %></td>
<td><%= truncate(term.description, length: 17, separator: " ", omission: '...') %></td>
<td>
<span class="tag <%=state_color(term.state)%>">
<%= I18n.t("terms_app.states.#{term.state}") %>
</span>
</td>
<td><%= term.updated_at %></td>
<td><%= link_to I18n.t("terms_app.categories.show.table.show"), category_term_path(@category.name, term), class: "btn btn-sm btn-secondary" %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
<%= will_paginate @terms, renderer: PolicyManager::BootstrapLinkRenderer %>