Favorieten toegevoegd aan de navigatiebalk en sidebar.

This commit is contained in:
2026-08-29 19:53:28 +02:00
parent 2912f7c455
commit ce07575d5e
19 changed files with 355 additions and 29 deletions
+12 -3
View File
@@ -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>
<% }); %>