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

40 lines
1.1 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 %}
<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>
<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>
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>
<td colspan="5">no records found</td>
</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 %}