{% extends 'base.html.twig' %}
{% block title %}{% trans %}City index{% endtrans %} {% endblock %}
{% block body %}
<h1>{% trans %}City index{% endtrans %}</h1>
<div class='table-scrollable'>
<table>
<thead>
<tr>
<th>{% trans %}Id{% endtrans %}</th>
<th>{% trans %}Name{% endtrans %}</th>
<th>{% trans %}Description{% endtrans %}</th>
<th>{% trans %}actions{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for city in cities %}
<tr>
<td>{{ city.id }}</td>
<td>{{ city.name }}</td>
<td>{{ city.description }}</td>
<td>
<a href="{{ path('city_show', {'id': city.id}) }}">{% trans %}show{% endtrans %}</a>
{% if is_granted('ROLE_HABITECH') %}
<a href="{{ path('city_edit', {'id': city.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('city_new') }}">{% trans %} Create new {% endtrans %}</a>
{% endif %}
{% endblock %}