caisse-bliss/templates/product/index.html.twig

52 lines
1.5 KiB
Twig
Raw Normal View History

2025-02-09 16:10:35 +01:00
{% extends 'base.html.twig' %}
2025-02-09 16:39:38 +01:00
{% block title %}Product index{% endblock %}
2025-02-09 16:10:35 +01:00
2025-02-09 16:39:38 +01:00
{% block body %}
2025-02-09 16:39:38 +01:00
<h1>Product index</h1>
2025-02-09 16:10:35 +01:00
2025-02-09 16:39:38 +01:00
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th>Stock</th>
2025-02-14 14:25:23 +01:00
<th>Image</th>
<th>Comment</th>
<th>Utilisateur-ice</th>
2025-02-09 16:39:38 +01:00
<th>actions</th>
</tr>
2025-02-09 16:10:35 +01:00
</thead>
<tbody>
{% for product in products %}
<tr>
2025-02-09 16:39:38 +01:00
<td>{{ product.id }}</td>
<td>{{ product.name }}</td>
2025-02-09 16:10:35 +01:00
<td>{{ product.price }}</td>
2025-02-09 16:39:38 +01:00
<td>{{ product.stock }}</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>
2025-02-14 14:25:23 +01:00
<td>{{ product.comment }}</td>
<td>{{ product.user.name }}, {{ product.user.email }}</td>
2025-02-09 16:10:35 +01:00
<td>
2025-02-09 16:39:38 +01:00
<a href="{{ path('app_product_show', {'id': product.id}) }}">show</a>
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>
2025-02-09 16:10:35 +01:00
</td>
</tr>
2025-02-09 16:39:38 +01:00
{% else %}
<tr>
2025-02-14 14:25:23 +01:00
<td colspan="7">no records found</td>
2025-02-09 16:39:38 +01:00
</tr>
2025-02-09 16:10:35 +01:00
{% endfor %}
</tbody>
</table>
2025-02-09 16:39:38 +01:00
<a href="{{ path('app_product_new') }}">Create new</a>
2025-02-09 16:10:35 +01:00
{% endblock %}