{% if etablissement.isClient %}
{% if etablissement.gestionnaire.id is defined %}
{% set idGestionnaire = etablissement.gestionnaire %}
{% if idGestionnaire is not null %}
{% set geres = idGestionnaire.geres %}
<div class="estabs">
<h2>Autres établissements du groupe</h2>
<ul>
{% for e in geres | filter ( e => e.actif ) %}
{% if e.id != etablissement.id %}
<li>
{% set urlFiche = pathBuilder.buildFiche(e) %}
{% if typeEtablissement(e.type) %} {{typeEtablissement(e.type) | raw }}{% else %}<span class="composition-internat">internat</span>{% endif %}<br>
<a href="{{ urlFiche }}">{{ e.denomination }} </a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% else %}
{% if etablissement.typeClient == 'établissement' and internatLie is not null %}
<div class="estabs">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
{% set urlFiche = pathBuilder.buildFiche(internatLie) %}
<span class="composition-internat">internat</span><br>
<a href="{{ urlFiche }}">{{ internatLie.denomination }} </a>
</li>
</ul>
</div>
{% elseif etablissement.typeClient == 'internat' and etsLie is not null %}
<div class="estabs">
<h2>Autres établissements du groupe</h2>
<ul>
<li>
{% set urlFiche = pathBuilder.buildFiche(etsLie) %}
{{typeEtablissement(etsLie.type) | raw }}<br>
<a href="{{ urlFiche }}">{{ etsLie.denomination }} </a>
</li>
</ul>
</div>
{% endif %}
{% endif %}
{% endif %}