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

75 lines
2.4 KiB
Twig
Raw Normal View History

2018-03-15 16:04:00 +01:00
{% extends 'base.html.twig' %}
{% block body %}
2019-06-12 14:52:58 +02:00
<div class="row heading-of-list">
2018-05-24 15:01:18 +02:00
<div class="col-xs-6">
<h1>Produits</h1></div>
<div class="col-xs-6">
2018-05-24 15:48:49 +02:00
2018-05-24 15:11:18 +02:00
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
2019-06-12 14:52:58 +02:00
<span class="hint alert alert-info pull-right">
2018-05-24 15:48:49 +02:00
astuce: Utilisez
2019-06-12 14:52:58 +02:00
<strong>
2018-05-24 15:48:49 +02:00
<a href="{{ path('import') }}">
l'import de masse
</a>
2019-06-12 14:52:58 +02:00
</strong>
2018-05-24 15:48:49 +02:00
pour créer plusieurs produits et catégories à la fois
</span>
2018-05-24 15:01:18 +02:00
</div>
</div>
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>
2019-06-12 14:52:58 +02:00
<th>Vendus</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>
2018-05-24 15:11:18 +02:00
<a class="btn btn-primary btn-block"
2018-04-17 14:30:15 +02:00
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
</td>
2018-05-24 15:11:18 +02:00
<td>
<a class="btn btn-primary btn-block"
href="{{ path('productcategory_edit', { 'id': product.category.id }) }}">
{{ product.category.name }}
</a>
</td>
<td>
<a class="btn btn-default btn-block" href="{{ path('product_edit', { 'id': product.id }) }}">
{{ product.name }}
</a>
</td>
<td>{{ product.image }}</td>
<td>{{ product.price }}</td>
2018-04-20 09:40:17 +02:00
<td>{{ product.stockCount }}</td>
2019-06-12 14:52:58 +02:00
<td>{{ product.productsSold | length }}</td>
<td>{{ product.comment }}</td>
<td>
2018-05-24 15:01:18 +02:00
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
<i class="fa fa-pencil"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
2018-05-24 15:11:18 +02:00
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau produit</a>
2018-03-15 16:04:00 +01:00
{% endblock %}