Favorieten toegevoegd aan de navigatiebalk en sidebar.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<button class="btn btn-primary" type="submit" form="product-edit-<%= product.id %>">Wijzigingen opslaan</button>
|
||||
<form method="post" action="/products/<%= product.id %>/delete"
|
||||
onsubmit="return confirm('Weet je zeker dat je dit product wilt verwijderen?');">
|
||||
<button class="btn btn-outline-danger" type="submit">Product verwijderen</button>
|
||||
<button class="btn btn-light border text-danger" type="submit">Product verwijderen</button>
|
||||
</form>
|
||||
<a class="btn btn-link" href="/products">Annuleren</a>
|
||||
</div>
|
||||
|
||||
@@ -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