{# * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, * * 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 . #} {% 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) }}

{{ 'General information'|trans }}

{{ 'First name'|trans }}
{{ person.firstName }}
{{ 'Last name'|trans }}
{{ person.lastName }}
{{ 'Gender'|trans }}
{{ ( person.genre|default('Not given'))|trans }}

{{ 'Birth information'|trans }}

{{ 'Date of birth'|trans }}
{%- if person.dateOfBirth is not null -%} {{ person.dateOfBirth|localizeddate('long', 'none') }} {%- else -%} {{ 'Unknown date of birth'|trans }} {%- endif -%}
{{ 'Place of birth'|trans }}
{{ person.placeOfBirth }}
{% spaceless %} {% if person.countryOfBirth is not null %} {{ person.countryOfBirth.name|localize_translatable_string }} {% else %} {{ 'Unknown country of birth'|trans }} {% endif %} {% endspaceless %}
{{ include(edit_tmp_name, edit_tmp_args) }}

{{ 'Administrative information'|trans }}

{{ 'Nationality'|trans }}
{% if person.nationality is not null %} {{ person.nationality.name|localize_translatable_string }} {% else %} {{ 'Without nationality'|trans }} {% endif %}
{{'Spoken languages'|trans}}
{% 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 %}
{{ include(edit_tmp_name, edit_tmp_args) }}

{{ 'Contact information'|trans }}

{{ 'Email'|trans }}
{{ person.email}} 
{{ 'Phonenumber'|trans }}
{{ person.phonenumber}} 
{{ include(edit_tmp_name, edit_tmp_args) }} {% if cFGroup %}
{% for customField in cFGroup.customFields %} {% if customField.type == 'title' %} {{ chill_custom_field_widget(person.cFData , customField) }} {% else %}
{{ chill_custom_field_label(customField) }}
{{ chill_custom_field_widget(person.cFData , customField) }}
{% endif %} {% endfor %}
{{ include(edit_tmp_name, edit_tmp_args) }} {% endif %} {% endblock %}