{% 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.person is not null %}
{{ resource.person }} {{ 'person'|trans|capitalize }}
{% elseif resource.thirdparty is not null %}
{{ resource.thirdparty }} {{ 'thirdparty'|trans|capitalize }}
{% else %}
{{ resource.freetext }}
{% endif %}
{% if resource.kind %} {{ resource.kind.title.fr|capitalize }} {% endif %}
{% if resource.comment.comment is not empty %}
{{ resource.comment|chill_entity_render_box }}
{% endif %} {% if is_granted('CHILL_PERSON_UPDATE', resource.person) %}
{% endif %}
{% endfor %}
{% else %}

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

{% endif %}

{{ 'Add a person resource'|trans }}

{% include "@ChillPerson/PersonResource/create.html.twig" %} {% endblock %}