{% macro href(pathname, key, value) %} {% set parms = { (key): value } %} {{ path(pathname, parms) }} {% endmacro %} {% if context == 'person' %} {% set blocs = [ { 'title': 'Others persons'|trans, 'items': entity.persons, 'path' : 'chill_person_view', 'key' : 'person_id' }, { 'title': 'Third parties'|trans, 'items': entity.thirdParties, 'path' : 'chill_3party_3party_show', 'key' : 'thirdparty_id' }, { 'title': 'Users concerned'|trans, 'items': entity.users, 'path' : 'admin_user_show', 'key' : 'id' }, ] %} {% else %} {% set blocs = [ { 'title': 'Persons in accompanying course'|trans, 'items': entity.personsAssociated, 'path' : 'chill_person_view', 'key' : 'person_id' }, { 'title': 'Third persons'|trans, 'items': entity.personsNotAssociated, 'path' : 'chill_person_view', 'key' : 'person_id' }, { 'title': 'Third parties'|trans, 'items': entity.thirdParties, 'path' : 'chill_3party_3party_show', 'key' : 'thirdparty_id' }, { 'title': 'Users concerned'|trans, 'items': entity.users, 'key' : 'id' }, ] %} {% endif %} {% if (with_display == 'bloc') %}
{% for bloc in blocs %}

{{ bloc.title }}

{% endfor %}
{% endif %} {% if (with_display == 'row') %}
{% for bloc in blocs %}
{% if bloc.items|length > 0 %}

{{ bloc.title }}

{% endif %}
{% endfor %}
{% endif %} {% if (with_display == 'wrap-list') %}
{% for bloc in blocs %}
{% if bloc.items|length > 0 %}

{{ bloc.title }}

{% for item in bloc.items %} {% if bloc.path is defined %} {{ item|chill_entity_render_box({ 'render': 'raw', 'addAltNames': false }) }} {% else %} {{ item|chill_entity_render_box({ 'render': 'raw', 'addAltNames': false }) }} {% endif %} {% endfor %}
{% endif %}
{% endfor %}
{% endif %}