fix folder name

This commit is contained in:
2021-03-18 13:37:13 +01:00
parent a2f6773f5a
commit eaa0ad925f
1578 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = null %}
{# define the title of the page #}
{% if form.vars.action == 'update' %}
{% set page_title = 'Update accompanying period'|trans %}
{% elseif form.vars.action == 'open' %}
{% set page_title = 'Update accompanying period'|trans %}
{% elseif form.vars.action == 'close' %}
{% set page_title = 'Update accompanying period'|trans %}
{% elseif form.vars.action == 'create' %}
{% set page_title = 'Create an accompanying period'|trans %}
{% else %}
{% set page_title = '' %}
{% endif %}
{% block title page_title %}
{% block personcontent %}
<h1>{{ page_title }}</h1>
{{ form_start(form) }}
<p>
{{ 'Last opening since %last_opening%'|trans(
{ '%last_opening%' : accompanying_period.openingDate|format_date('long') }) }}
</p>
{% if form.openingDate is defined %}
{{ form_row(form.openingDate, { 'label': 'Opening date'} ) }}
{% endif %}
{% if form.closingDate is defined %}
{{ form_row(form.closingDate, {'label' : 'Closing date'} ) }}
{% endif %}
{% if form.closingMotive is defined %}
{{ form_row(form.closingMotive, {'label' : 'Closing motive'} ) }}
{% endif %}
{% if form.user is defined %}
{{ form_row(form.user, {'label': 'Accompanying user'}) }}
{% endif %}
{{ form_row(form.remark, {'label' : 'Remark' } ) }}
{{ form_rest(form) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
<button type="submit" class="sc-button bt-save">
{% if form.vars.action == 'update' %}
{{ 'Update accompanying period'|trans }}
{% elseif form.vars.action == 'open' %}
{{ 'Update accompanying period'|trans }}
{% elseif form.vars.action == 'close' %}
{{'Close accompanying period'|trans }}
{% elseif form.vars.action == 'create' %}
{{ 'Create an accompanying period'|trans }}
{% endif %}
</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock personcontent %}

View File

@@ -0,0 +1,104 @@
{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_person_accompanying_period_list' %}
{% block title %}{{ 'Person accompanying period - %name%'|trans({ '%name%' : person.__toString}) }}{% endblock title %}
{% block personcontent %}
<table class="rounded">
<thead>
<tr>
<th class="chill-red">{{ 'accompanying_period.dates'|trans }}</th>
{% if chill_accompanying_periods.fields.user == 'visible' %}
<th class="chill-blue">{{ 'Accompanying user'|trans }}</th>
{% endif %}
<th class="chill-orange">{{ 'Remark'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for accompanying_period in accompanying_periods %}
<tr>
<td>
{% if accompanying_period.closingDate == null %}
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
{% else %}
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
'%opening_date%': accompanying_period.openingDate|format_date('long'),
'%closing_date%': accompanying_period.closingDate|format_date('long')}
) }}
{% if accompanying_period.isOpen == false %}
<dl class="chill_view_data">
<dt>{{ 'Closing motive'|trans }}&nbsp;:</dt>
<dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
</dl>
{% endif %}
{% endif %}
</td>
{% if chill_accompanying_periods.fields.user == 'visible' %}
<td>
{% if accompanying_period.user %}
{{ accompanying_period.user.username }}
{% else %}
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
{% endif %}
</td>
{% endif %}
<td>
{{ accompanying_period.remark|chill_print_or_message('No remark', 'blockquote') }}
</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-update no-content"></a>
</li>
{% if accompanying_period.isOpen == true %}
<li>
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" class="sc-button bt-update has-hidden change-icon">
<i class="fa fa-lock" aria-hidden="true"></i><span class="show-on-hover">{{'Close accompanying period'|trans }}</span>
</a>
</li>
{% endif %}
{% if accompanying_period.canBeReOpened == true %}
<li>
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="sc-button bt-create change-icon has-hidden">
<i class="fa fa-unlock" aria-hidden="true"></i><span class="show-on-hover">{{'Re-open accompanying period'|trans }}</span>
</a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="form_control">
<ul class="record_actions">
<li class="cancel">
<a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" class="sc-button bt-cancel">
{{ 'Person details'|trans }}
</a>
</li>
<li>
<a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="sc-button bt-create has-hidden">
<span class="show-on-hover">{{ 'Add an accompanying period in the past'|trans }}</span>
</a>
</li>
{% if person.isOpen == false %}
<li>
<a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="sc-button bt-create change-icon has-hidden">
<i class="fa fa-unlock" aria-hidden="true"></i>
<span class="show-on-hover">{{'Begin a new accompanying period'|trans }}</span>
</a>
</li>
{% endif %}
</ul>
</div>
{% endblock personcontent %}

View File

@@ -0,0 +1,27 @@
{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_person_accompanying_period_list' %}
{% block title 'Re-Open a period'|trans %}
{% block personcontent %}
<h1>{{ 'Re-Open a period'|trans }}</h1>
<p class="message-confirm">{{ 'Are you sure you want to re-open this period ?'|trans }}<p>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_person_accompanying_period_re_open', {'confirm' : true, 'person_id' : person.id, 'period_id' : period.id } ) }}" class="sc-button bt-create">
{{'Confirm'|trans }}
</a>
</li>
</ul>
{% endblock personcontent %}

View File

@@ -0,0 +1,48 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = '' %}
{% block title 'Update address for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) %}
{% block personcontent %}
<h1>{{ 'Update address for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
{{ form_start(form) }}
{{ form_row(form.isNoAddress) }}
{{ form_row(form.streetAddress1) }}
{{ form_row(form.streetAddress2) }}
{{ form_row(form.postCode) }}
{{ form_row(form.validFrom) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_person_address_list', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_row(form.submit, { 'attr' : { 'class': 'sc-button bt-save' }, 'label': 'Save' } ) }}
</li>
</ul>
{{ form_end(form) }}
{% endblock personcontent %}

View File

@@ -0,0 +1,82 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% import '@ChillMain/Address/macro.html.twig' as address_macros %}
{% set activeRouteKey = '' %}
{% block title %}{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
{% block personcontent %}
<h1>{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
<table class="records_list">
<thead>
<tr>
<th>{{ 'Valid from'|trans }}</th>
<th>{{ 'Address'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% if person.addresses|length == 0 %}
<tr>
<td colspan="3">
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
{{ 'Add an address'|trans }}
</a>
</td>
</tr>
{% else %}
{% for address in person.addresses %}
<tr>
<td><strong>{{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long') } ) }}</strong></td>
<td>
{{ address_macros._render(address, { 'with_valid_from' : false, 'has_no_address': true } ) }}
</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_person_view', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">
{{ 'Back to the person details'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}" class="sc-button bt-create">
{{ 'Add an address'|trans }}
</a>
</li>
</ul>
{% endblock personcontent %}

View File

@@ -0,0 +1,52 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = '' %}
{% block title %}{{ 'New address for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %}
<h1>{{ 'New address for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
{{ form_start(form) }}
{{ form_row(form.isNoAddress) }}
{{ form_row(form.streetAddress1) }}
{{ form_errors(form.streetAddress1) }}
{{ form_row(form.streetAddress2) }}
{{ form_errors(form.streetAddress2) }}
{{ form_row(form.postCode) }}
{{ form_errors(form.postCode) }}
{{ form_row(form.validFrom) }}
{{ form_errors(form.validFrom) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_person_address_list', { 'person_id' : person.id } ) }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_row(form.submit, { 'attr' : { 'class': 'sc-button bt-create' }, 'label': 'Create' } ) }}
</li>
</ul>
{{ form_end(form) }}
{% endblock personcontent %}

View File

@@ -0,0 +1,55 @@
{#
* 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/Admin/layoutWithVerticalMenu.html.twig" %}
{% block vertical_menu_content %}
{{ chill_menu('admin_person', {
'layout': '@ChillPerson/Admin/menu.html.twig',
}) }}
{% endblock %}
{% block layout_wvm_content %}
<div class="grid-12 centered">
<h1>{{ 'Configuration of person bundle' |trans }}</h1>
<p>{{ 'person_admin.What would you like to configure ?'|trans }}</p>
<ul>
<li>
<p>
<a href="{{ path('chill_crud_closing_motive_index') }}">
<strong>{{ 'person_admin.closing motives list'|trans }}</strong>
</a>
</p>
<p>{{ 'person_admin.closing motive explanation'|trans }}</p>
</li>
<li>
<p>
<a href="{{ path('chill_crud_marital_status_index') }}">
<strong>{{ 'person_admin.marital status list'|trans }}</strong>
</a>
</p>
<p>{{ 'person_admin.marital status explanation'|trans }}</p>
</li>
</ul>
</div>
{% endblock %}

View File

@@ -0,0 +1,21 @@
{#
* 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/Menu/verticalMenu.html.twig" %}
{% block v_menu_title %}{{ 'Configuration of person bundle'|trans }}{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends '@ChillMain/CRUD/_index.html.twig' %}
{% block list_actions %}
<ul class="record_actions sticky-form-buttons">
{% block add_new %}
<li>
<a href="{{ chill_path_add_return_path('chill_crud_' ~ crud_name ~ '_new', { 'person_id': person.id }) }}" class="sc-button bt-new">{{ ('crud.'~crud_name~'.index.add_new')|trans( {'%crud_name%': crud_name} ) }}</a>
</li>
{% endblock %}
</ul>
{% endblock list_actions %}

View File

@@ -0,0 +1,30 @@
{% extends '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index', { 'person_id': person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>
{% endblock %}
{% block content_form_actions_save_and_close %}
<li class="">
<button type="submit" name="submit" value="save-and-close" class="sc-button bt-create">
{{ 'crud.new.save_and_close'|trans }}
</button>
</li>
{% endblock %}
{% block content_form_actions_save_and_show %}
<li class="">
<button type="submit" name="submit" value="save-and-show" class="sc-button bt-create">
{{ 'crud.new.save_and_show'|trans }}
</button>
</li>
{% endblock %}
{% block content_form_actions_save_and_new %}
<li class="">
<button type="submit" name="submit" value="save-and-new" class="sc-button bt-create">
{{ 'crud.new.save_and_new'|trans }}
</button>
</li>
{% endblock %}

View File

@@ -0,0 +1 @@
{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%person%': person|chill_entity_render_string }) }}

View File

@@ -0,0 +1,46 @@
{% extends '@ChillMain/CRUD/_view_content.html.twig' %}
{% block content_view_actions_back %}
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index', { 'person_id': person.id }) }}">
{{ 'Cancel'|trans }}
</a>
</li>
{% endblock %}
{% block content_form_actions_delete %}
{% if chill_crud_action_exists(crud_name, 'delete') %}
{% if is_granted(chill_crud_config('role', crud_name, 'delete'), entity) %}
<li class="">
<a class="sc-button bt-delete" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_delete', { 'id': entity.id, 'person_id': person.id }) }}">
{{ 'crud.delete.link_to_form'|trans }}
</a>
</li>
{% endif %}
{% endif %}
{% endblock content_form_actions_delete %}
{% block content_view_actions_duplicate_link %}
{% if chill_crud_action_exists(crud_name, 'new') %}
{% if is_granted(chill_crud_config('role', crud_name, 'new'), entity) %}
<li>
<a class="sc-button bt-duplicate" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_new', { 'duplicate_id': entity.id, 'duplicate': true, 'person_id': person.id }) }}">
{{ 'crud.view.link_duplicate'|trans }}
</a>
</li>
{% endif %}
{% endif %}
{% endblock content_view_actions_duplicate_link %}
{% block content_view_actions_edit_link %}
{% if chill_crud_action_exists(crud_name, 'edit') %}
{% if is_granted(chill_crud_config('role', crud_name, 'edit'), entity) %}
<li>
<a class="sc-button bt-edit" href="{{ chill_path_forward_return_path('chill_crud_'~crud_name~'_edit', { 'id': entity.id, 'person_id': person.id }) }}">
{{ 'crud.new.link_edit'|trans }}
</a>
</li>
{% endif %}
{% endif %}
{% endblock content_view_actions_edit_link %}

View File

@@ -0,0 +1 @@
{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}

View File

@@ -0,0 +1,9 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% set person = entity.person %}
{% set activeRouteKey = '' %}
{% block personcontent %}
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,13 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% set person = entity.person %}
{% set activeRouteKey = '' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock title %}
{% block personcontent %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% set activeRouteKey = '' %}
{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
{% block personcontent %}
{% embed '@ChillPerson/CRUD/_index.html.twig' %}
{% block add_new %}
<li>
<a href="{{ chill_path_add_return_path('chill_crud_' ~ crud_name ~ '_new', { 'person_id': person.id } ) }}" class="sc-button bt-new">{{ ('crud.'~crud_name~'.index.add_new')|trans( {'%crud_name%': crud_name} ) }}</a>
</li>
{% endblock %}
{% endembed %}
{% endblock personcontent %}

View File

@@ -0,0 +1,16 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% set person = entity.person %}
{% set activeRouteKey = '' %}
{% block title %}
{% embed('@ChillPerson/CRUD/_new_title.html.twig') %}{% endembed %}
{% endblock %}
{% block personcontent %}
{% embed '@ChillPerson/CRUD/_new_content.html.twig' %}
{% block crud_content_header %}
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
{% endblock crud_content_header %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends '@ChillPerson/layout.html.twig' %}
{% set person = entity.person %}
{% set activeRouteKey = '' %}
{% block title %}
{% include('@ChillPerson/CRUD/_view_title.html.twig') %}
{% endblock %}
{% block personcontent %}
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
{% block crud_content_header %}
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
{% endblock crud_content_header %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,40 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
<th>{{ 'Ordering'|trans }}</th>
<th>{{ 'Label'|trans }}</th>
<th>{{ 'Active'|trans }}</th>
<th>&nbsp;</th>
{% endblock %}
{% block table_entities_tbody %}
{% for entity in entities %}
<tr>
<td>{{ entity.ordering }}</td>
<td>{{ entity|chill_entity_render_box }}</td>
<td style="text-align:center">
{% if entity.active %}
<i class="fa fa-check-square-o"></i>
{% else %}
<i class="fa fa-square-o"></i>
{% endif %}
</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_crud_closing_motive_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li>
{% if entity.active %}
<li>
<a href="{{ chill_path_add_return_path('chill_crud_closing_motive_new', { 'parent_id': entity.id } ) }}" class="sc-button bt-new">{{ 'closing_motive.new child'|trans }}</a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,5 @@
{% block _export_export_list_export_form_address_date_row %}
<div data-display-show-hide="address_date">
{{ form_row(form) }}
</div>
{% endblock %}

View File

@@ -0,0 +1 @@
<a class="sc-button black" href="{{ path(form_path_key, form_path_args) }}">{{ 'Edit'|trans|upper }}</a>

View File

@@ -0,0 +1,12 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th>
<th>{{ 'Name'|trans }}</th>
<th>&nbsp;</th>
{% endblock %}
{% block table_entities_tbody %}
{% for entity in entities %}
<tr>
<td>{{ entity.id }}</td>
<td>{{ entity.name|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_crud_marital_status_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,49 @@
{#
* 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 "@ChillMain/layout.html.twig" %}
{% block title %}{{ 'Add a 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">
{{ form_start(form) }}
<h1>{{ 'Add a person'|trans }}</h1>
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}
{% if form.altNames is defined %}
{{ form_widget(form.altNames) }}
{% endif %}
{{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }}
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
{{ form_row(form.creation_date, { 'label' : 'Creation date'|trans }) }}
{{ form_rest(form) }}
<button class="sc-button green" type="submit" alt="add a person"><i class="fa fa-plus"></i> {{ 'Add the person'|trans }}</button>
{{ form_end(form) }}
</div>
</div>
{% endblock content %}

View File

@@ -0,0 +1,92 @@
{#
* 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 "@ChillMain/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">
<div class="warning flash_message">
<span>
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
%nb% person with similar name. Please verify that this is a new person
{% endtranschoice %}
</span>
</div>
{% 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|chill_entity_render_string }}{% apply spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% endif %}
{% endapply %}
</a>
</td>
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %}&nbsp;{% endif %}</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>{{ 'Name'|trans }}</dt>
<dd>{{ person|chill_entity_render_string }}</dd>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>{{ birthdate|format_date('long')|default( 'Unknown date of birth'|trans ) }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ gender|trans }}</dd>
<dt>{{ 'Creation date'|trans }}</dt>
<dd>{{ creation_date|format_date('long') }}</dd>
{% if form.altNames is defined %}
{# mark as rendered #}
{{ form_widget(form.altNames) }}
{% endif %}
</dl>
{{ form_rest(form) }}
<button class="sc-button bt-create change-icon" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock content %}

View File

@@ -0,0 +1,112 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = '' %}
{% block title %}{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %}
<h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1>
{% form_theme form '@ChillMain/Form/fields.html.twig' %}
{{ form_start(form) }}
{% if form.memo is defined %}
<fieldset>
<legend><h2>{{ 'Memo'|trans }}</h2></legend>
{{ form_row(form.memo, {'label' : 'Memo'} ) }}
</fieldset>
{% endif %}
<fieldset>
<legend><h2>{{ 'General information'|trans }}</h2></legend>
{{ form_row(form.firstName, {'label' : 'First name'}) }}
{{ form_row(form.lastName, {'label' : 'Last name'}) }}
{% if form.altNames is defined %}
{{ form_widget(form.altNames, { 'label': 'Alternative names'}) }}
{% endif %}
{{ form_row(form.gender, {'label' : 'Gender'}) }}
</fieldset>
<fieldset>
<legend><h2>{{ 'Birth information'|trans }}</h2></legend>
{{ form_row(form.birthdate, {'label': 'Date of birth'} ) }}
{%- if form.placeOfBirth is defined -%}
{{ form_row(form.placeOfBirth, { 'label' : 'Place of birth'} ) }}
{%- endif -%}
{%- if form.countryOfBirth is defined -%}
{{ form_row(form.countryOfBirth, { 'label' : 'Country of birth' } ) }}
{%- endif -%}
</fieldset>
{%- if form.nationality is defined or form.spokenLanguages is defined or form.maritalStatus is defined -%}
<fieldset>
<legend><h2>{{ 'Administrative information'|trans }}</h2></legend>
{%- if form.nationality is defined -%}
{{ form_row(form.nationality, { 'label' : 'Nationality'|trans} ) }}
{%- endif -%}
{%- if form.spokenLanguages is defined -%}
{{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }}
{%- endif -%}
{%- if form.maritalStatus is defined -%}
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }}
{%- endif -%}
</fieldset>
{%- endif -%}
{%- if form.email is defined or form.phonenumber is defined or form.mobilenumber is defined or form.contactInfo is defined-%}
<fieldset>
<legend><h2>{{ 'Contact information'|trans }}</h2></legend>
{%- if form.email is defined -%}
{{ form_row(form.email, {'label': 'Email'}) }}
{%- endif -%}
{%- if form.phonenumber is defined -%}
{{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }}
{%- endif -%}
{%- if form.mobilenumber is defined -%}
{{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }}
{%- endif -%}
{%- if form.contactInfo is defined -%}
{{ form_row(form.contactInfo, {'label': 'Notes on contact information'}) }}
{%- endif -%}
</fieldset>
{%- endif -%}
{{ form_rest(form) }}
<ul class="grid-12 sticky-form-buttons record_actions ">
<li class="cancel">
<a href="{{ path('chill_person_view', {'person_id' : person.id}) }}" class="sc-button grey center margin-5">
<i class="fa fa-arrow-left"></i>
{{ 'Return'|trans }}
</a>
</li>
<li>
<button class="sc-button bt-save" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock personcontent %}

View File

@@ -0,0 +1,119 @@
{#
* 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/>.
#}
<h2>{{ title|default('Person search results')|trans }}</h2>
<p>
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="sc-button button-small">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>
</p>
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
{% if persons|length > 0 %}
<table>
<thead>
<tr>
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
<th class="chill-orange">{% trans %}Nationality{% endtrans %}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for person in persons %}
<tr>
<td>
{% set is_open = person.isOpen() %}
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
{{ person|chill_entity_render_box }}
{% apply spaceless %}
{% if chill_person.fields.accompanying_period == 'visible' %}
{% if is_open == false %}
<i class="fa fa-lock" ></i>
{% else %}
<i class="fa fa-unlock" ></i>
{% endif %}
{% endif %}
{% endapply %}
</a>
</td>
<td>
{% if person.birthdate is not null %}
{{ person.birthdate|format_date('long') }}
{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
</td>
<td>
{% if person.nationality is not null %}
{{person.nationality.name | localize_translatable_string }}
{% else %}
{{ 'Without nationality'|trans }}
{% endif %}
</td>
<td>
<ul class="record_actions">
<li><a class="sc-button bt-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
<li><a class="sc-button bt-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_CREATE') %}
<li>
<a href="{{ path('chill_person_new') }}" class="sc-button bt-create">
{{ 'Add a person'|trans }}
</a>
</li>
{% endif %}
{% if search_name != "person_similarity" %}
<li>
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="sc-button bt-action">
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
</a>
</li>
{% endif %}
{% if preview == true and persons|length < total %}
<li>
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="sc-button">
{{ 'See all results'|trans }}
</a>
</li>
{% endif %}
</ul>
{% else %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="sc-button bt-action">
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
</a>
</li>
</ul>
{% endif %}
{% if preview == false %}
{{ chill_pagination(paginator) }}
{% endif %}

View File

@@ -0,0 +1,108 @@
{#
* 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/>.
#}
<h2>{{ title|default('Person search results by phonenumber')|trans }}</h2>
<p>
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="sc-button button-small">
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
</a>
</p>
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
{% if persons|length > 0 %}
<table class="person-list__--by-phonenumber">
<thead>
<tr>
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
<th class="chill-orange">{% trans %}Phonenumber{% endtrans %}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for person in persons %}
<tr>
<td>
{% set is_open = person.isOpen() %}
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
{{person.firstName}} {{person.lastName}}
{% apply spaceless %}
{% if chill_person.fields.accompanying_period == 'visible' %}
{% if is_open == false %}
<i class="fa fa-lock" ></i>
{% else %}
<i class="fa fa-unlock" ></i>
{% endif %}
{% endif %}
{% endapply %}
</a>
</td>
<td>
{% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
</td>
<td class="person-list__--by-phonenumber__phones">
<ul>
{% if person.phonenumber is not empty %}
<li>
<a href="tel:{{ person.phonenumber }}"><img src="{{ asset('build/images/mobile-alt-solid.svg') }}">&nbsp;<pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>
</li>
{% endif %}
{% if person.mobilenumber is not empty%}
<li>
<a href="tel:{{ person.mobilenumber }}"><img src="{{ asset('build/images/phone-alt-solid.svg') }}">&nbsp;<pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>
</li>
{% endif %}
</ul>
</td>
<td>
<ul class="record_actions">
<li><a class="sc-button bt-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
<li><a class="sc-button bt-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_CREATE') %}
<li>
<a href="{{ path('chill_person_new') }}" class="sc-button bt-create">
{{ 'Add a person'|trans }}
</a>
</li>
{% endif %}
{% if preview == true and persons|length < total %}
<li>
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="sc-button">
{{ 'See all results'|trans }}
</a>
</li>
{% endif %}
</ul>
{% endif %}
{% if preview == false %}
{{ chill_pagination(paginator) }}
{% endif %}

View File

@@ -0,0 +1,19 @@
{% macro render(p, withLink=true, withClosingInfo=false) %}{% apply spaceless %}
<span class="entity entity-person person-person">
{% if withLink %}
<a href="{{ path('chill_person_view', { 'person_id' : p.id } ) }}">
{% endif %}
{{ p.firstName }}&nbsp;{{ p.lastName }}
{% if withClosingInfo %}
{% if chill_person.fields.accompanying_period == 'visible' %}
{% set is_open = p.isOpen() %}
{% if is_open == false %}
<i class="fa fa-folder" ></i>
{% else %}
<i class="fa fa-folder-open" ></i>
{% endif %}
{% endif %}
{% endif %}
{% if withLink %}</a>{% endif %}
</span>{% endapply %}
{% endmacro %}

View File

@@ -0,0 +1,264 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% import '@ChillMain/Address/macro.html.twig' as address %}
{% set activeRouteKey = 'chill_person_view' %}
{#
This view should receive those arguments:
- person
#}
{% block title %}{{ 'Person details'|trans|capitalize ~ ' ' ~ person.firstName|capitalize ~
' ' ~ person.lastName }}{% 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 %}
<div class="person-view">
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
{% if person.memo is not empty and chill_person.fields.memo == 'visible' %}
<div class="grid-12">
<figure class="person-details">
<h2 class="chill-red">{{ 'Memo'|trans }}</h2>
<p>
<blockquote>{{ person.memo|nl2br }}</blockquote>
</p>
</figure>
</div>
{% endif %}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-red">{{ 'General information'|trans }}</h2>
<dl>
<dt>{{ 'First name'|trans }}&nbsp;:</dt>
<dd>{{ person.firstName }}</dd>
<dt>{{ 'Last name'|trans }}&nbsp;:</dt>
<dd>{{ person.lastName }}</dd>
{% for el in person.altNames %}
{% if el.key in alt_names|keys %}
<dt>{{ alt_names[el.key]|localize_translatable_string }}&nbsp;:</dt>
<dd>{{ el.label }}</dd>
{% endif %}
{% endfor %}
<dt>{{ 'Gender'|trans }}&nbsp;:</dt>
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
</dl>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-green"><i class="fa fa-birthday-cake"></i>&nbsp;{{ 'Birth information'|trans }}</h2>
<dl>
<dt>{{ 'Date of birth'|trans }}&nbsp;:</dt>
<dd>
{%- if person.birthdate is not null -%}
{{ person.birthdate|format_date('long') }}
{%- else -%}
<span class="chill-no-data-statement">{{ 'Unknown date of birth'|trans }}</span>
{%- endif -%}
</dd>
{%- if chill_person.fields.place_of_birth == 'visible' -%}
<dt>{{ 'Place of birth'|trans }}&nbsp;:</dt>
{% if person.placeOfBirth is not empty %}
<dd>{{ person.placeOfBirth }}</dd>
{% else %}
<dd><span class="chill-no-data-statement">{{ 'Not given'|trans }}</span></dd>
{% endif %}
{%- endif -%}
{%- if chill_person.fields.country_of_birth == 'visible' -%}
<dt>{{ 'Country of birth'|trans }}&nbsp;:</dt>
<dd>{% apply spaceless %}
{% if person.countryOfBirth is not null %}
{{ person.countryOfBirth.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'Unknown country of birth'|trans }}</span>
{% endif %}
{% endapply %}</dd>
{%- endif -%}
</dl>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
</div>
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
{%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-orange">{{ 'Administrative information'|trans }}</h2>
{%- if chill_person.fields.nationality == 'visible' -%}
<dl>
<dt>{{ 'Nationality'|trans }}&nbsp;:</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'Without nationality'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.spoken_languages == 'visible' -%}
<dl>
<dt>{{'Spoken languages'|trans}}&nbsp;:</dt>
<dd>
{% if person.spokenLanguages|length == 0 %}
<span class="chill-no-data-statement">{{ 'Unknown spoken languages'|trans }}</span>
{% else %}
{% for lang in person.spokenLanguages %}
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.marital_status == 'visible' -%}
<dl>
<dt>{{'Marital status'|trans}}&nbsp;:</dt>
<dd>
{% if person.maritalStatus is not null %}
{{ person.maritalStatus.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
{%- endif -%}
{%- if chill_person.fields.email == 'visible' or chill_person.fields.phonenumber == 'visible' or chill_person.fields.mobilenumber == 'visible' or chill_person.fields.contact_info == 'visible' -%}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i>&nbsp;{{ 'Contact information'|trans }}</h2>
{%- if chill_person.fields.address == 'visible' -%}
<dl>
<dt>{{ 'Address'|trans }}</dt>
<dd>
{%- if person.lastAddress is not empty -%}
{{ address._render(person.lastAddress, {'has_no_address': true}) }}
<ul class="record_actions record_actions_small">
<li>
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : person.lastAddress.id } ) }}" class="sc-button has-hidden button-small bt-edit">
<span class="show-on-hover">{{ 'Edit'|trans }}</span>
</a>
</li>
<li>
<a href="{{ path('chill_person_address_list', { 'person_id': person.id } ) }}" class="sc-button has-hidden button-small">
<i class="fa fa-list" aria-hidden="true"></i><span class="show-on-hover">{{ "Addresses'history"|trans }}</span>
</a>
</li>
</ul>
{%- else -%}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}" class="">
{{ 'Add an address'|trans }}
</a>
{%- endif -%}
</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.email == 'visible' -%}
<dl>
<dt>{{ 'Email'|trans }}&nbsp;:</dt>
<dd>{% if person.email is not empty %}<blockquote class="chill-user-quote">{{ person.email|nl2br }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.phonenumber == 'visible' -%}
<dl>
<dt>{{ 'Phonenumber'|trans }}&nbsp;:</dt>
<dd>{% if person.phonenumber is not empty %}<a href="tel:{{ person.phonenumber }}"><pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
</dl>
{% endif %}
{%- if chill_person.fields.mobilenumber == 'visible' -%}
<dl>
<dt>{{ 'Mobilenumber'|trans }}&nbsp;:</dt>
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
</dl>
{% endif %}
{%- if chill_person.fields.contact_info == 'visible' -%}
<dl>
<dt>{{ 'Notes on contact information'|trans }}&nbsp;:</dt>
<dd>{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
</dl>
{%- endif -%}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
{%- endif -%}
</div>
{% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div class="grid-12 custom-fields">
<figure class="person-details">
{{ chill_custom_fields_group_widget(person.cFData, cFGroup) }}
</figure>
</div>
</div>
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<figure class="person-details">
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
{% endif %}
</div> <!-- end of div.person-view -->
{% endblock %}

View File

@@ -0,0 +1,11 @@
<h3 class="single-line">
{{ period.closingDate|format_date('long') }}
<span class="person"> /
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
{{ 'Closing the accompanying period' | trans }}
</a>
<span>
<span class="chill-red">
<i class="fa fa-folder"></i>
</span>
</h3>

View File

@@ -0,0 +1,35 @@
{#
* 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 "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_person_timeline' %}
{#
This view should receive those arguments:
- person
#}
{% block title %}{{ 'Timeline for %name%'|trans({'%name%': person }) }}{% endblock %}
{% block personcontent %}
{{ timeline|raw }}
{% if nb_items > paginator.getItemsPerPage %}
{{ chill_pagination(paginator) }}
{% endif %}
{% endblock personcontent %}

View File

@@ -0,0 +1,11 @@
<h3 class="single-line">
{{ period.openingDate|format_date('long') }}
<span class="person"> /
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
{{ 'Opening the accompanying period' | trans }}
</a>
</span>
<span class="chill-green">
<i class="fa fa-folder-open"></i>
</span>
</h3>

View File

@@ -0,0 +1,9 @@
{% if is_granted('CHILL_PERSON_CREATE') %}
<div class="grid-8 centered" style="text-align:center; margin-top: 1.5em;">
<a href="{{ path('chill_person_new') }}">
<div class="sc-button blue" style="float: inherit;">
{{ 'Add a person'|trans }}
</div>
</a>
</div>
{% endif %}

View File

@@ -0,0 +1,20 @@
{#
if the `custom_fields` option is used, the custom fields are available
under the customFields variable, with the custom field slug as key.
#}
{% import 'ChillPersonBundle:Person:macro.html.twig' as person %}
<div class="grid-8 centered">
<h2>{{ 'Accompanyied people'|trans }}</h2>
<table>
<tbody>
<tr>
{% for p in persons %}
{% if (loop.index - 1) % 3 == 0 %}
</tr><tr>
{% endif %}
<td>{{ person.render(p, true) }}</td>
{% endfor %}
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,101 @@
{#
* 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 %}

View File

@@ -0,0 +1,23 @@
{#
* 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/>.
#}
<ul class="tab-nav">
{% for menu in menus %}
<li class="">
<a href="{{ menu.uri }}" >{{ menu.label|upper }}</a>
</li>
{% endfor %}
</ul>