62 lines
2.0 KiB
Twig
Executable File
62 lines
2.0 KiB
Twig
Executable File
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<h1>Produits</h1></div>
|
|
<div class="col-xs-6">
|
|
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<table class="table-responsive table-striped table table-bordered table-light">
|
|
<thead class="bg-dark">
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Category</th>
|
|
<th>Name</th>
|
|
<th>Image</th>
|
|
<th>Price</th>
|
|
<th>Stocks</th>
|
|
<th>Comment</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for product in products %}
|
|
<tr>
|
|
<td>
|
|
<a class="btn btn-primary btn-block"
|
|
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
|
|
</td>
|
|
<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>
|
|
<td>{{ product.stockCount }}</td>
|
|
<td>{{ product.comment }}</td>
|
|
<td>
|
|
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
|
|
<i class="fa fa-pencil"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau produit</a>
|
|
{% endblock %}
|