Mathieu Jaumotte ccee105efb batch replace grid- (scratch) by col- (bootstrap)
hand replace
* push- by offset-
* no-gutter by g-0

add breakpoints md- and sm-
2021-07-08 15:44:32 +02:00

143 lines
6.2 KiB
Twig

{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <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 "@ChillMain/layoutWithVerticalMenu.html.twig" %}
{% block top_banner %}
<div class="banner banner-person">
<div id="header-person-name" class="header-name">
<div class="container-xxl">
<div class="row">
<div class="col-sm">
<h1>
{% set gender =
(person.gender == "woman") ? 'female' :
(person.gender == "both") ? 'neuter' : 'male'
%}
<i class="fa fa-fw fa-{{ gender }}" title="{{ gender|capitalize|trans }}"></i>
{{ person|chill_entity_render_string }}
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}">
{{ person.id|upper }}
</span>
</h1>
</div>
<div class="col-sm">
<ul class="list-content fa-ul">
<li>
{%- if person.currentHouseholdAddress is not empty -%}
<i class="fa fa-li fa-map-marker"></i>
{{ person.currentHouseholdAddress|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
{%- elseif person.lastAddress is not empty -%}
<i class="fa fa-li fa-map-marker"></i>
{{ person.lastAddress|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
{%- endif -%}
</li>
<li>
{% if person.mobilenumber %}
<i class="fa fa-li fa-mobile"></i>
<a href="{{ 'tel:' ~ person.mobilenumber }}" class="phone mr-3" title="{{ 'Mobilenumber'|trans }}">
{{ person.mobilenumber|chill_format_phonenumber }}</a>
{% elseif person.phonenumber %}
<i class="fa fa-li fa-phone"></i>
<a href="{{ 'tel:' ~ person.phonenumber }}" class="phone mr-3" title="{{ 'Phonenumber'|trans }}">
{{ person.phonenumber|chill_format_phonenumber }}</a>
{% endif %}
</li>
<li>
{% if person.email %}
<i class="fa fa-li fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
{{ person.email }}
</a>
{% endif %}
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="header-person-details" class="header-details">
<div class="container-xxl">
<div class="row justify-content-md-right">
<div class="col-sm-5" style="@media (min-width: 576px) { padding-left: 2em; }">
<span class="open_sansbold">
{{ 'Birthdate'|trans|upper }} &nbsp; :
</span>
{% if person.birthdate == null %}
{{ 'Unknown date of birth'|trans }}
{% else %}
{{ person.birthdate|format_date('short') }}
{% endif %}
<span class="age">
{{ person.age ~ ((person.age > 1) ? ' ans' : ' an') }}
</span>
</div>
{%- if chill_person.fields.nationality == 'visible' -%}
<div class="col-sm-auto">
<span class="open_sansbold">
{{ 'Nationality'|trans|upper}} &nbsp; :
</span>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
{% trans %}Without nationality{% endtrans %}
{% endif %}
</div>
{%- endif -%}
{%- if chill_person.fields.spoken_languages == 'visible' -%}
<div class="col-sm-3">
<span class="open_sansbold">
{{ 'Center'|trans|upper}} &nbsp; :
</span>
{{ person.center.name|upper }}
</div>
{%- endif -%}
</div>
</div>
</div>
<a id="banner-person"></a>
</div>
{% endblock %}
{% block layout_wvm_content %}
<div class="mt-3">
{% block personcontent %}{# block personcontent empty #}{% endblock %}
</div>
{% endblock %}
{% block vertical_menu_content %}
{{ chill_menu('person', {
'layout': '@ChillPerson/menu.html.twig',
'args' : {'person_id': person.id, 'person': person },
'activeRouteKey': activeRouteKey
}) }}
<div class="block-post-menu">
{{ chill_delegated_block('person_post_vertical_menu', { 'person': person } ) }}
</div>
{% endblock %}