{% extends 'base.html.twig' %}{% block title %}{% trans %}Child index{%endtrans%}{% endblock %}{% block body %}<h1>{% trans %}Child index{% endtrans %}</h1><div class="table-scrollable"><table><thead><tr><th>{% trans %}Id{% endtrans %}</th><th>{% trans %}Child's name{% endtrans %}</th><th>{% trans %}Birth date{% endtrans %}</th><th>{% trans %}Birth place{% endtrans %}</th><th>{% trans %}Sex{% endtrans %}</th><th>{% trans %}Father's name{% endtrans %}</th><th>{% trans %}Mother's name{% endtrans %}</th><th>{% trans %}Other Contact{% endtrans %}</th><th>{% trans %}actions{% endtrans %}</th></tr></thead><tbody>{% if is_granted('IS_AUTHENTICATED_FULLY') %}{% for child in children %}{% if is_granted('ROLE_CEC') or is_granted('ROLE_SCEC') or is_granted('ROLE_CEC_OFFICER') or is_granted('ROLE_CEC_SECRETARY') %}{% if (child.hospital.municipality is defined) %}{% if child.hospital.municipality == app.user.municipality %}<tr><td>{{ child.id }}</td><td>{{ child.nameOfTheChild }}</td><td>{{ child.dateOfBirth ? child.dateOfBirth|date('Y-m-d H:i:s') : '' }}</td><td>{{ child.placeOfBirth }}</td><td>{{ child.sex }}</td><td>{{ child.nameOfTheFather }}</td><td>{{ child.nameOfTheMother }}</td><td>{{ child.otherContact }}</td><td><a href="{{ path('child_show', {'id': child.id}) }}">{% trans %}show{% endtrans %}</a><a href="{{ path('child_edit', {'id': child.id}) }}">{% trans %}edit{% endtrans %}</a></td></tr>{% endif %}{% endif %}{% endif %}{% if is_granted('ROLE_HOSPITAL') %}{% if child.hospital == app.user.hospital %}<tr><td>{{ child.id }}</td><td>{{ child.nameOfTheChild }}</td><td>{{ child.dateOfBirth ? child.dateOfBirth|date('Y-m-d H:i:s') : '' }}</td><td>{{ child.placeOfBirth }}</td><td>{{ child.sex }}</td><td>{{ child.nameOfTheFather }}</td><td>{{ child.nameOfTheMother }}</td><td>{{ child.otherContact }}</td><td><a href="{{ path('child_show', {'id': child.id}) }}" class="fa fa-eye">{% trans %}show{% endtrans %}</a><!--a href="{{ path('child_edit', {'id': child.id}) }}">edit</a--></td></tr>{% endif %}{% endif %}{% if is_granted('ROLE_PAYS') or is_granted('ROLE_REGION') or is_granted('ROLE_MIN') %}<tr><td>{{ child.id }}</td><td>{{ child.nameOfTheChild }}</td><td>{{ child.dateOfBirth ? child.dateOfBirth|date('Y-m-d H:i:s') : '' }}</td><td>{{ child.placeOfBirth }}</td><td>{{ child.sex }}</td><td>{{ child.nameOfTheFather }}</td><td>{{ child.nameOfTheMother }}</td><td>{{ child.otherContact }}</td><td><a href="{{ path('child_show', {'id': child.id}) }}">{% trans %}show{% endtrans %}</a><a href="{{ path('child_edit', {'id': child.id}) }}">{% trans %}edit{% endtrans %}</a></td></tr>{% endif %}{% else %}<tr><td colspan="22">{% trans %} no records found{% endtrans %}</td></tr>{% endfor %}{% endif %}</tbody></table></div><a href="{{ path('child_new') }}">{% trans %} Create new {% endtrans %}</a>{% endblock %}