{% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = 'chill_person_resource_list' %} {% block title %}{{ 'Person resources'|trans|capitalize ~ ' ' ~ person|chill_entity_render_string }}{% endblock %} {% block js %} {{ encore_entry_script_tags('page_person_resource_showhide_input') }} {{ encore_entry_script_tags('mod_pickentity_type') }} {% endblock %} {% block css %} {{ encore_entry_link_tags('page_person_resource_showhide_input') }} {{ encore_entry_link_tags('mod_pickentity_type') }} {% endblock %} {% block personcontent %}

{{ 'List of resources'|trans }}

{% if personResources|length > 0 %}
{% for resource in personResources %}
{% if resource.kind is not null %}

{{ resource.kind.title.fr|capitalize }}

{% endif %}
{% if resource.person is not null %} {{ resource.person|chill_entity_render_box({ 'render': 'bloc', 'addLink': true, 'addInfo': true, 'addAge': true }) }} {% elseif resource.thirdparty is not null %} {{ resource.thirdparty|chill_entity_render_box({ 'render': 'bloc', 'showContacts': false, 'addLink': true, 'isConfidential': (resource.thirdparty.contactDataAnonymous ? true : false) }) }} {% else %}
{{ resource.freetext }}
{% endif %}
{% if resource.comment.comment is not empty %}
{{ resource.comment|chill_entity_render_box }}
{% endif %} {% if is_granted('CHILL_PERSON_UPDATE', resource.personOwner) %}
{% endif %}
{% endfor %}
{% else %}

{{ 'There are no available resources'|trans }}

{% endif %} {% if is_granted('CHILL_PERSON_UPDATE', person) %} {% endif %} {% endblock %}