up styles, handle owner of products on controllers

This commit is contained in:
Tykayn 2025-02-26 16:33:36 +01:00 committed by tykayn
parent 457cafdaef
commit e973573fd7
33 changed files with 773 additions and 818 deletions

View file

@ -3,6 +3,8 @@
{% block title %}Product index{% endblock %}
{% block body %}
<h1>Product index</h1>
<table class="table">
@ -14,6 +16,7 @@
<th>Stock</th>
<th>Image</th>
<th>Comment</th>
<th>Utilisateur-ice</th>
<th>actions</th>
</tr>
</thead>
@ -24,8 +27,13 @@
<td>{{ product.name }}</td>
<td>{{ product.price }}</td>
<td>{{ product.stock }}</td>
<td>{{ product.image }}</td>
<td>
<a href="{{ path('app_product_show', {'id': product.id}) }}">
<img src="{{ product.image }}" alt="{{ product.name }}" style="width: 100px; height: 100px;">
</a>
</td>
<td>{{ product.comment }}</td>
<td>{{ product.user.name }}, {{ product.user.email }}</td>
<td>
<a href="{{ path('app_product_show', {'id': product.id}) }}">show</a>
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>