{% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = '' %} {% block title %}{{ 'Residential addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %} {% block personcontent %}

{{ 'Residential addresses history'|trans }}

{% if is_granted('CHILL_PERSON_SEE', person) %} {% if addresses|length == 0 %} {{ 'No address given'|trans }} {% else %}
{% for a in addresses %} {% if a.address is not null %} {% set kind = 'address' %} {% else %} {% set kind = null %} {% endif %}
  • {{'Since'|trans}} : {{ a.startDate|format_date('long') }}
  • {% if a.endDate is not null %}
  • {{'Until'|trans}} : {{ a.endDate|format_date('long') }}
  • {% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %} {% endif %}
    {% if a.hostPerson is not null %}
  • {{ "Address of"|trans}} {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: 'person', id: a.hostPerson.id }, buttonText: a.hostPerson|chill_entity_render_string, isDead: a.hostPerson.deathdate is not null } %}
  • {% set address_date = date(a.startDate|date("m/d/Y")) %} {% if a.hostPerson.getCurrentHouseholdAddress(a.endDate) is not null %} {{ a.hostPerson.getCurrentHouseholdAddress(a.endDate)|chill_entity_render_box }} {% endif %}
  • {% elseif a.hostThirdParty is not null %}
  • {{ "Address of"|trans}} {{ a.hostThirdParty|chill_entity_render_box }}
  • {% if a.hostThirdParty.address is not null %} {{ a.hostThirdParty.address|chill_entity_render_box }} {% endif %}
  • {% else %}
  • {% if a.address is not null %} {{ a.address|chill_entity_render_box }} {% endif %} {% endif %}
{% if not a.comment.isEmpty %} {{ a.comment|chill_entity_render_box }} {% endif %}
{% endfor %}
{% endif %} {% endif %}
{% endblock %}