caisse-bliss/templates/product/index.html.twig
2025-02-09 16:39:38 +01:00

40 lines
1.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Product index{% endblock %}
{% block body %}
<h1>Product index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th>Stock</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td>{{ product.id }}</td>
<td>{{ product.name }}</td>
<td>{{ product.price }}</td>
<td>{{ product.stock }}</td>
<td>
<a href="{{ path('app_product_show', {'id': product.id}) }}">show</a>
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_product_new') }}">Create new</a>
{% endblock %}