Favorieten toegevoegd aan de navigatiebalk en sidebar.
This commit is contained in:
@@ -23,9 +23,18 @@
|
||||
<strong><%= product.category_icon || "" %> <%= product.name %></strong>
|
||||
<div class="text-secondary"><%= product.category_name || "Geen categorie" %></div>
|
||||
</div>
|
||||
<a class="btn btn-sm btn-outline-primary" href="/products/<%= product.id %>/edit">
|
||||
Wijzigen
|
||||
</a>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<form method="post" action="/products/<%= product.id %>/favorite">
|
||||
<button class="btn btn-sm <%= product.is_favorite ? 'btn-danger' : 'btn-outline-secondary' %>"
|
||||
type="submit"
|
||||
aria-label="<%= product.is_favorite ? 'Verwijder uit favorieten' : 'Toevoegen aan favorieten' %>">
|
||||
<%= product.is_favorite ? '♥' : '♡' %>
|
||||
</button>
|
||||
</form>
|
||||
<a class="btn btn-sm btn-outline-primary" href="/products/<%= product.id %>/edit">
|
||||
Wijzigen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }); %>
|
||||
|
||||
Reference in New Issue
Block a user