mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 15:54:23 +00:00
150 lines
4.4 KiB
Twig
150 lines
4.4 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 "ChillPersonBundle::layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'chill_person_view' %}
|
|
|
|
{#
|
|
This view should receive those arguments:
|
|
- person
|
|
#}
|
|
|
|
{% block title %}ChillPersonBundle:Person:see{% endblock %}
|
|
{#
|
|
we define variables to include an edit form repeated multiple time across
|
|
the page
|
|
#}
|
|
{% set edit_tmp_name = 'ChillPersonBundle:Form:go_to_form.html.twig' %}
|
|
{% set edit_tmp_args = { 'form_path_args' : { 'person_id': person.id },
|
|
'form_path_key' : 'chill_person_general_edit' } %}
|
|
|
|
|
|
{% block personcontent %}
|
|
|
|
|
|
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
|
|
<figure>
|
|
<h2>{{ 'General information'|trans }}</h2>
|
|
|
|
<dl>
|
|
<dt class="inline">{{ 'First name'|trans }}</dt>
|
|
<dd>{{ person.firstName }}</dd>
|
|
|
|
<dt class="inline">{{ 'Last name'|trans }}</dt>
|
|
<dd>{{ person.lastName }}</dd>
|
|
|
|
<dt class="inline">{{ 'Gender'|trans }}</dt>
|
|
<dd>{{ ( person.genre|default('Not given'))|trans }}</dd>
|
|
</dl>
|
|
</figure>
|
|
|
|
<figure>
|
|
<h2>{{ 'Birth information'|trans }}</h2>
|
|
|
|
<dl>
|
|
<dt class="inline">{{ 'Date of birth'|trans }}</dt>
|
|
<dd>
|
|
{%- if person.dateOfBirth is not null -%}
|
|
{{ person.dateOfBirth|localizeddate('long', 'none') }}
|
|
{%- else -%}
|
|
{{ 'Unknown date of birth'|trans }}
|
|
{%- endif -%}
|
|
</dd>
|
|
|
|
|
|
<dt class="inline">{{ 'Place of birth'|trans }}</dt>
|
|
<dd>{{ person.placeOfBirth }}</dd>
|
|
<dd>{% spaceless %}
|
|
|
|
{% if person.countryOfBirth is not null %}
|
|
{{ person.countryOfBirth.name|localize_translatable_string }}
|
|
{% else %}
|
|
{{ 'Unknown country of birth'|trans }}
|
|
{% endif %}
|
|
|
|
{% endspaceless %}</dd>
|
|
|
|
|
|
</dl>
|
|
</figure>
|
|
|
|
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
|
|
<figure>
|
|
<h2>{{ 'Administrative information'|trans }}</h2>
|
|
|
|
<dl>
|
|
<dt class="inline">{{ 'Nationality'|trans }}</dt>
|
|
<dd>
|
|
{% if person.nationality is not null %}
|
|
{{ person.nationality.name|localize_translatable_string }}
|
|
{% else %}
|
|
{{ 'Without nationality'|trans }}
|
|
{% endif %}
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="inline">{{'Spoken languages'|trans}}</dt>
|
|
<dd>
|
|
{% if person.spokenLanguages|length == 0 %}
|
|
{{ 'Unknown spoken languages'|trans }}
|
|
{% else %}
|
|
{% for lang in person.spokenLanguages %}
|
|
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</dd>
|
|
</dl>
|
|
</figure>
|
|
|
|
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
|
|
<figure>
|
|
<h2>{{ 'Contact information'|trans }}</h2>
|
|
|
|
<dl>
|
|
<dt class="inline">{{ 'Email'|trans }}</dt>
|
|
<dd><pre>{{ person.email}} </pre></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="inline">{{ 'Phonenumber'|trans }}</dt>
|
|
<dd><pre>{{ person.phonenumber}} </pre></dd>
|
|
</dl>
|
|
|
|
</figure>
|
|
|
|
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
|
|
{% if cFGroup %}
|
|
<figure>
|
|
{% for customField in cFGroup.customFields %}
|
|
{% if customField.type == 'title' %}
|
|
{{ chill_custom_field_widget(person.cFData , customField) }}
|
|
{% else %}
|
|
<dt>{{ chill_custom_field_label(customField) }}</dt>
|
|
<dd>{{ chill_custom_field_widget(person.cFData , customField) }}</dd>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</figure>
|
|
|
|
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|