add basic pagination on wow_mounts page

This commit is contained in:
Etienne Ischer
2021-04-29 10:27:01 +02:00
parent d6afeb8771
commit 7d582ebd91
7 changed files with 198 additions and 20 deletions

View File

@@ -1,20 +1,17 @@
<h2>Mount list</h2>
<table class="table table-hover table-dark table-image">
<thead>
<tr>
<th scope="col"><%= t('wow_mounts.mount_list.name') %></th>
<th scope="col"><%= t('wow_mounts.mount_list.description') %></th>
<th scope="col"><%= t('wow_mounts.mount_list.owned') %></th>
</tr>
</thead>
<tbody>
<% @wow_mounts.each do |mount| %>
<tr>
<td><%= link_to mount.name, mount %></td>
<td><%= mount.description %></td>
<td></td>
</tr>
<% end %>
</tbody>
</table>
<div class="row">
<% @wow_mounts.each do |mount| %>
<div class="col-2 d-flex justify-content-center">
<div class="card" style="width: 18rem;">
<img src=<%= mount.asset_zoom %> class="card-img-top" alt="<%= mount.name %>-zoom-image">
<div class="card-body">
<h5 class="card-title"><%= mount.name %></h5>
<p class="card-text"><%= mount.description %></p>
<%= link_to 'Detail', mount, class: "btn btn-primary" %>
</div>
</div>
</div>
<% end %>
<%== pagy_bootstrap_nav(@pagy) %>
</div>