{# * Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS, * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . #} {% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = '' %} {% block title %}{{ 'Addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %} {% block personcontent %}

{{ 'Addresses history'|trans }}

  • {# include vue_address component #} {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, backUrl: path('chill_person_address_list', { 'person_id': person.id }), mode: 'create', buttonSize: 'btn-lg', buttonText: 'Add an address', modalTitle: 'Add an address', } %}
{% if person.addresses|length == 0 %} {{ 'No address given'|trans }} {% else %}
{% endif %}

{{ 'Person addresses'|trans }}

{{ 'Household addresses'|trans }}

{% set row = 0 %} {% set previousRowFrom = null %} {% for address in person.addresses %} {% set row = row + 1 %} {% if address.validTo is not empty and address.validTo < previousRowFrom %} {# include vue_address component #} {# {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, backUrl: path('chill_person_address_list', { 'person_id': person.id }), mode: 'edit', addressId: address.id, bindModalStep1: false, bindModalStep2: false, } %} #}
{# include vue_address component #} {# {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, backUrl: path('chill_person_address_list', { 'person_id': person.id }), mode: 'edit', addressId: address.id, bindModalStep1: false, bindModalStep2: false, } %} #}
{% if address.validTo is not empty %} {{ address.validTo|format_date('short') }} {% endif %}
{% set row = row + 1 %} {% endif %} {# if person address #}
{{ address|chill_entity_render_box({ 'render': 'bloc', 'multiline': true, 'extended_infos': true, 'has_no_address': true }) }}
{# endif #}
{# if household address #}{#
...
#}{# endif #}
{% if address.validFrom is not empty %} {{ address.validFrom|format_date('short') }} {% endif %}
{% set previousRowFrom = address.validFrom %} {% endfor %} {# TEST HOUSEHOLD POSITION #}
549, chemin De Sousa , 45, boulevard Aurore Roux
10850 Nanterre (France)
01/01/1970
{# END TEST #}
{% endblock %}