{% extends 'base.html.twig' %}
{% block title %}Products{% endblock %}
{% block body %}
<div class="d-flex align-items-center justify-content-between mb-2">
<h1 class="mt-4 mb-3">Products</h1>
<a class="btn btn-primary mt-3" href="{{ path('app_product_new') }}"> Add new</a>
</div>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th>Abteilung</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.storeArea.name }}</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="4">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}