{% set contactClass = 'App\\Entity\\Contact' %}
{% if author is defined and author is not empty %}
{% if author is not instanceof(contactClass) %}
{% set initials = author|split(' ') %}
{% if author is defined and author is not empty %}
{% if author.visibleAnnuaire is defined and author.visibleAnnuaire is not empty %}
{% if author.visibleAnnuaire == true %}
<a href="/user/{{ get_user_by_contact_id(author.id).id }}" class="nodeco diblock">
<span class="diflex initials author cwhite jcc aic fs12" title="{{ author }}">
{{ initials[0]|first|upper }}
{{ initials[1]|first|upper }}
</span>
</a>
{% else %}
{% include "users/showInitials.html.twig" %}
{% endif %}
{% else %}
{% include "users/showInitials.html.twig" %}
{% endif %}
{% else %}
{% include "users/showInitials.html.twig" %}
{% endif %}
{% else %}
{% if author.id is defined and author.id is not empty %}
{% if author.visibleAnnuaire is defined and author.visibleAnnuaire is not empty %}
{% if author.visibleAnnuaire == true %}
<a href="/user/{{ get_user_by_contact_id(author.id).id }}" class="nodeco diblock">
<span class="diflex initials author cwhite jcc aic fs12" title="{{ author.fullName }}">
{% set initials = author.fullName|split(' ') %}
{{ initials[0]|first|upper }}
{{ initials[1]|first|upper }}
</span>
</a>
{% else %}
<div class="nodeco diblock">
<span class="diflex initials author cwhite jcc aic fs12" title="{{ author.fullName }}">
{% set initials = author.fullName|split(' ') %}
{{ initials[0]|first|upper }}
{{ initials[1]|first|upper }}
</span>
</div>
{% endif %}
{% else %}
<div class="nodeco diblock">
<span class="diflex initials author cwhite jcc aic fs12" title="{{ author.fullName }}">
{% set initials = author.fullName|split(' ') %}
{{ initials[0]|first|upper }}
{{ initials[1]|first|upper }}
</span>
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if contributors is defined and contributors is not empty and contributors|length > 0 %}
{% for contributor in contributors %}
{% if contributor is instanceof(contactClass) %}
{% include "users/logic/isUserInAnnuaire.html.twig" %}
{% else %}
{% include "users/logic/isUserInAnnuaire.html.twig" with {contributor: sulu_resolve_contact(contributor)} %}
{% endif %}
{% endfor %}
{% endif %}