{% extends 'base.html.twig' %}
{% block title %}{% trans %}Hospital index{%endtrans%} {% endblock %}
{% block body %}
<h1>{% trans %}Hospital 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 %}City{% endtrans %}</th>
<th>{% trans %}Subdivision{% endtrans %}</th>
<th>{% trans %}Category{% endtrans %}</th>
<th>{% trans %}actions{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for hospital in hospitals %}
<tr>
<td>{{ hospital.id }}</td>
<td>{{ hospital.name }}</td>
<td>{{ hospital.description }}</td>
<td>{{ hospital.municipality.subdivision.city }}</td>
<td>{{ hospital.municipality }}</td>
<td>{{ hospital.hospitalCategory }}</td>
<td>
<a href="{{ path('hospital_show', {'id': hospital.id}) }}" class=" w3-btn w3-teal w3-animate-fading w3-small w3-round-xlarge"><span class="fa fa-eye"></span>{% trans %}show{% endtrans %}</a>
{% if (is_granted('ROLE_HABITECH')) %}
<a href="{{ path('hospital_edit', {'id': hospital.id}) }}" class=" w3-btn w3-green w3-animate-fading w3-small w3-round-xlarge"><span class="fa fa-edit"></span>{% trans %}edit{% endtrans %}</a>
<a href="{{ path('child_hospital_index', {'id': hospital.id}) }}" class=" w3-btn w3-blue w3-animate-fading w3-small w3-round-xlarge"><span class="fa fa-child"></span>{% trans %}see children{% 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('hospital_new') }}">{% trans %} Create new {% endtrans %}</a>
{% endif %}
{% endblock %}