caisse-bliss/app/Resources/views/product/index.html.twig

55 lines
1.7 KiB
Twig
Raw Normal View History

2018-03-15 16:04:00 +01:00
{% extends 'base.html.twig' %}
{% block body %}
<h1>Products list</h1>
2018-04-17 14:52:31 +02:00
<table class="table-responsive table-striped table table-bordered table-light">
<thead class="bg-dark">
2018-04-17 14:30:15 +02:00
<tr>
<th>Id</th>
2018-04-20 09:44:15 +02:00
<th>Category</th>
2018-04-17 14:30:15 +02:00
<th>Name</th>
<th>Image</th>
<th>Price</th>
2018-04-20 09:40:17 +02:00
<th>Stocks</th>
2018-04-17 14:30:15 +02:00
<th>Comment</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
2018-04-17 14:30:15 +02:00
<td>
<a class="btn btn-primary"
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
</td>
2018-04-20 09:44:15 +02:00
<td>{{ product.category.name }}</td>
<td>{{ product.name }}</td>
<td>{{ product.image }}</td>
<td>{{ product.price }}</td>
2018-04-20 09:40:17 +02:00
<td>{{ product.stockCount }}</td>
<td>{{ product.comment }}</td>
<td>
<ul>
<li>
2018-04-17 14:30:15 +02:00
<a class="btn btn-default" href="{{ path('product_show', { 'id': product.id }) }}">voir</a>
</li>
<li>
2018-04-17 14:30:15 +02:00
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
<i class="fa fa-pencil"></i>
</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul>
<li>
2018-04-17 14:52:31 +02:00
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau product</a>
</li>
</ul>
2018-03-15 16:04:00 +01:00
{% endblock %}