app/views/admin/pages/index.html.erb
<div class="row">
<div class="col-10">
<h1 class="h4">
Páginas
</h1>
</div>
<div class="col-2">
<%= link_to "Criar página", new_admin_page_path, class: 'btn btn-primary btn-block' %>
</div>
</div>
<table class="table table-bordered table-hover table-sm mt-3">
<thead class="thead-dark">
<tr>
<th scope="col">Caminho</th>
<th scope="col">Título</th>
<th scope="col">Tipo</th>
</tr>
</thead>
<tbody>
<% @pages.each do |page| -%>
<tr data-cy="page" class="<%= "table-info" unless page.embedded? %>">
<td>
<%= link_to page.path, admin_page_path(page) %>
</td>
<th scope="row">
<%= page.title %>
</th>
<td>
<%= page.context_i18n %>
</td>
</tr>
<% end -%>
</tbody>
</table>
<div>
<%= paginate @pages %>
</div>