2018-03-15 16:04:00 +01:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block body %}
|
2018-04-05 17:09:06 +02:00
|
|
|
<h1>Products list</h1>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<thead>
|
2018-04-17 14:30:15 +02:00
|
|
|
<tr>
|
|
|
|
<th>Id</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Image</th>
|
|
|
|
<th>Price</th>
|
|
|
|
<th>Comment</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
2018-04-05 17:09:06 +02:00
|
|
|
</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-05 17:09:06 +02:00
|
|
|
<td>{{ product.name }}</td>
|
|
|
|
<td>{{ product.image }}</td>
|
|
|
|
<td>{{ product.price }}</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>
|
2018-04-05 17:09:06 +02:00
|
|
|
</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>
|
2018-04-05 17:09:06 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
2018-04-17 14:30:15 +02:00
|
|
|
<a class="btn btn-primary" href="{{ path('product_new') }}">Create a new product</a>
|
2018-04-05 17:09:06 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2018-03-15 16:04:00 +01:00
|
|
|
{% endblock %}
|