mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-26 20:16:14 +00:00
102 lines
4.3 KiB
Twig
102 lines
4.3 KiB
Twig
{#
|
|
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
|
*
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
#}
|
|
{% extends "@ChillPerson/layout.html.twig" %}
|
|
|
|
{% import '@ChillMain/Address/macro.html.twig' as address_macros %}
|
|
|
|
{% set activeRouteKey = '' %}
|
|
|
|
{% block title %}{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
|
|
|
|
{% block personcontent %}
|
|
|
|
<h1>{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
|
|
|
|
<div class="person__address">
|
|
|
|
<div class="row">
|
|
<div class="person__address--date"></div>
|
|
<div class="person__address--content">
|
|
<div class="cell">
|
|
<div>
|
|
{% if person.addresses|length == 0 %}
|
|
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
|
{% endif %}
|
|
<a class="sc-button bt-create"
|
|
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
|
{{ 'Add an address'|trans }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% for address in person.addresses %}
|
|
<div class="row">
|
|
<div class="person__address--date">
|
|
<div class="cell">
|
|
<div class="pill">
|
|
{% if address.validFrom is not empty %}
|
|
{{ address.validFrom|format_date('long') }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="person__address--content">
|
|
<div class="cell">
|
|
<i class="dot"></i>
|
|
<div>
|
|
{% if address.isNoAddress == true %}
|
|
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
|
{% else %}
|
|
<div>
|
|
{% if address.street is not empty %}
|
|
<div class="street">
|
|
<i class="fa fa-fw fa-map-marker"></i>
|
|
<span class="streetNumber">{{ address.street }}</span>
|
|
{% if address.streetNumber is not empty %}
|
|
<span class="streetNumber">, {{ address.streetNumber }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if address.postCode is not empty %}
|
|
<div class="postCode">
|
|
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
|
|
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<ul class="record_actions">
|
|
<li class="cancel">
|
|
<a href="{{ path('chill_person_view', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">
|
|
{{ 'Back to the person details'|trans }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
{% endblock personcontent %}
|