add media to WowPet and pagination
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
<h2>Pet list</h2>
|
||||
|
||||
<table class="table table-hover table-dark table-image">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%= t('wow_pets.pet_list.name') %></th>
|
||||
<th scope="col"><%= t('wow_pets.pet_list.description') %></th>
|
||||
<th scope="col"><%= t('wow_pets.pet_list.owned') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wow_pets.each do |pet| %>
|
||||
<tr>
|
||||
<td><%= link_to pet.name, pet %></td>
|
||||
<td><%= pet.description %></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<% @wow_pets.each do |pet| %>
|
||||
<div class="col-2 d-flex justify-content-center">
|
||||
<div class="card" style="width: 18rem;">
|
||||
<img src=<%= pet.media_zoom_url %> class="card-img-top" alt="pet-<%= pet.id %>-zoom-image">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= pet.name %></h5>
|
||||
<p class="card-text"><%= pet.description %></p>
|
||||
<%= link_to 'Detail', pet, class: "btn btn-primary" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%== pagy_bootstrap_nav(@pagy) %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user