chill-bundles/Resources/views/Person/create_review.html.twig
2015-12-04 19:37:47 +01:00

81 lines
3.9 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 "ChillMainBundle::layout.html.twig" %}
{% block title %}{{ 'Alreay existing person'|trans }}{% endblock title %}
{% block content %}
<div class="grid-12 parent" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
{% if alternatePersons is not empty %}
<table>
<thead>
<tr>
<th class="chill-red">{{ 'Name'|trans }}</th>
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
</tr>
</thead>
<tbody>
{% for person in alternatePersons %}
<tr>
<td>
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
{{ person }}{% spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% endif %}
{% endspaceless %}
</a>
</td>
<td>{{ person.birthdate|localizeddate('long', 'none', app.request.locale) }}</td>
<td>
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div id="person_details">
{{ form_start(form) }}
<h2>{{ 'You will create this person'|trans }}</h2>
<dl>
<dt>{{ 'First name'|trans }}</dt>
<dd>{{ firstName }}</dd>
<dt>{{ 'Last name'|trans }}</dt>
<dd>{{ lastName }}</dd>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>{{ birthdate|localizeddate('long', 'none', app.request.locale)|default( 'Unknown date of birth'|trans ) }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ gender|trans }}</dd>
<dt>{{ 'Creation date'|trans }}</dt>
<dd>{{ creation_date|localizeddate('long', 'none', app.request.locale) }}</dd>
</dl>
{{ form_rest(form) }}
<button class="sc-button green" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock content %}