{% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = 'chill_person_view' %} {% block title 'household.Household history for person'|trans %} {% macro bloc_content(p) %}
{% if p.endDate %}
Jusqu'au {{ p.endDate|format_date('long') }}
{% endif %}

En tant que

{{ p.position.label|localize_translatable_string }} {% if p.holder %} {{ 'household.holder'|trans }} {% endif %}

{{ 'household.Members at same time'|trans }}

{% set simultaneous = p.household.getMembersDuringMembership(p) %} {% if simultaneous|length == 0 %}

{{ 'household.Any simultaneous members'|trans }}

{% else %} {% for m in simultaneous -%} {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: 'person', id: m.person.id }, buttonText: m.person|chill_entity_render_string } %} {%- endfor -%} {% endif %}
{% endmacro %} {% block personcontent %}

{{ 'household.Household history'|trans }}

{{ 'household.Household shared'|trans }}

{% set memberships = person.getHouseholdParticipationsShareHousehold() %} {% if memberships|length == 0 %}

{{ 'household.Never in any household'|trans }}

{% else %}
{% for p in memberships %}
{{ _self.bloc_content(p) }}
{% endfor %}
{% if not person.isSharingHousehold() %} {% endif %} {% endif %}
{% set memberships = person.getHouseholdParticipationsNotShareHousehold() %} {% if memberships|length > 0 %}

{{ 'household.Household not shared'|trans }}

{% for p in memberships %}
{{ _self.bloc_content(p) }}
{% endfor %}
{% endif %}
{% endblock %}