{% extends 'base.html.twig' %}
{% block title %}{% trans%}Subdivision {% endtrans %}{% endblock %}
{% block body %}
<h1>{% trans %}Subdivision index{% endtrans %}</h1>
<div class='table-scrollable'>
<table class="display " >
<thead>
<tr>
<th>{% trans %}Id{% endtrans %}</th>
<th>{% trans %}Name{% endtrans %}</th>
<th>{% trans %}Description{% endtrans %}</th>
<th>{% trans %}UpdateAt{% endtrans %}</th>
<th>{% trans %}actions{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for subdivision in subdivisions %}
<tr>
<td>{{ subdivision.id }}</td>
<td>{{ subdivision.name }}</td>
<td>{{ subdivision.description }}</td>
<td>{{ subdivision.updateAt ? subdivision.updateAt|date('Y-m-d H:i:s') : '' }}</td>
<td>
<a href="{{ path('subdivision_show', {'id': subdivision.id}) }}">{% trans %}show{% endtrans %}</a>
{% if is_granted('ROLE_HABITECH') %}
<a href="{{ path('subdivision_edit', {'id': subdivision.id}) }}">{% trans %}edit{% endtrans %}</a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="5">{% trans %} no records found{% endtrans %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_granted('ROLE_HABITECH') %}
<a href="{{ path('subdivision_new') }}">{% trans %} Create new {% endtrans %}</a>
{% endif %}
{% endblock %}