chill-bundles/Resources/views/layout.html.twig

101 lines
4.1 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/>.
#}
{#
The layout of the admin section. All the page / template of the admin section must use this
layout.
#}
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
{% block top_banner %}
<div class="grid-12 parent" id="header-person-name" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div class="grid-3">
<span class="open_sansbold">{{ 'Name'|trans|upper }}&nbsp;:</span> {{ person|chill_entity_render_string }}
</div>
<div class="grid-3">
<span class="open_sansbold">{{ 'File number'|trans|upper}}&nbsp;:</span> {{ person.id|upper }}
&mdash;
<i class="fa fa-{% apply spaceless %}
{% if person.gender == "woman" %}
female
{% elseif person.gender == "both" %}
neuter
{% else %}
male
{% endif %}
{% endapply %}"></i>
</div>
<div class="grid-3">
<span class="open_sansbold">{{ 'Phonenumber'|trans|upper }}&nbsp;:</span>
{% set phone = person.mobilenumber|default(person.phonenumber) %}
{% if phone is not empty %}{{ phone|chill_format_phonenumber }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}
</div>
</div>
</div>
<div class="grid-12 parent" id="header-person-details" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div class="grid-3">
<span class="open_sansbold">{{ 'Birthdate'|trans|upper }}&nbsp;:</span>
{% if person.birthdate == null %}
{{ 'Unknown date of birth'|trans }}
{% else %}
{{ person.birthdate|format_date('long') }}
{% endif %}
</div>
{%- if chill_person.fields.nationality == 'visible' -%}
<div class="grid-3">
<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="grid-3">
<span class="open_sansbold">{{ 'Center'|trans|upper}}&nbsp;:</span> {{ person.center.name|upper }}
</div>
{%- endif -%}
</div>
</div>
{% endblock %}
{% block layout_wvm_content %}
<div class="container content">
{% 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 %}