mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
166 lines
7.2 KiB
Twig
166 lines
7.2 KiB
Twig
{% extends 'ChillPersonBundle:AccompanyingCourse:layout.html.twig' %}
|
|
{% import '@ChillMain/Address/macro.html.twig' as address %}
|
|
|
|
{% block title %}
|
|
{{ 'Resume Accompanying Course'|trans }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% if 'DRAFT' == accompanyingCourse.step %}
|
|
<div class="grid-8 centered error flash_message">
|
|
<span>
|
|
{{ 'This accompanying course is still a draft'|trans }}
|
|
<a href="{{ path('chill_person_accompanying_course_show', { 'accompanying_period_id': accompanyingCourse.id } ) }}">
|
|
{{ 'Edit & activate accompanying course'|trans }}
|
|
</a>
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h2>{{ 'Associated peoples'|trans }}</h2>
|
|
<div class="flex-bloc right">
|
|
{% for p in accompanyingCourse.participations %}
|
|
{% if p.enddate is null %}
|
|
<div class="item-bloc">
|
|
|
|
<h5>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h5>
|
|
<dl class="content-bloc">
|
|
|
|
<dd>
|
|
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
|
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
|
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
|
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
|
(p.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
|
</dd>
|
|
<dd>
|
|
{% if p.person.mobilenumber %}
|
|
<i class="fa fa-fw fa-mobile"></i>{{ p.person.mobilenumber }}
|
|
{% else %}
|
|
<i class="fa fa-fw fa-phone"></i>
|
|
{% if p.person.phonenumber %}
|
|
{{ p.person.phonenumber }}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
|
{% endif %}
|
|
{% endif %}
|
|
</dd>
|
|
<dd>
|
|
{%- if p.person.lastAddress is not empty -%}
|
|
{{ address._render(p.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }}
|
|
{%- else -%}
|
|
<dt class="fa fa-fw fa-map-marker"></dt>
|
|
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
|
{%- endif -%}
|
|
</dd>
|
|
|
|
</dl>
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_person_view', { person_id: p.person.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
|
|
<h2>{{ 'Resources'|trans }}</h2>
|
|
<div class="flex-bloc right">
|
|
{% for r in accompanyingCourse.resources %}
|
|
<div class="item-bloc">
|
|
{% if r.person %}
|
|
|
|
<h5>
|
|
{{ r.person.firstname ~ ' ' ~ r.person.lastname }}
|
|
<span class="badge badge-pill badge-light">{{ 'Usager' }}</span>
|
|
</h5>
|
|
<dl class="content-bloc">
|
|
|
|
<dd>
|
|
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
|
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
|
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
|
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
|
(r.person.gender == 'mhomme') ? 'fa-mars' : 'neutre' %}
|
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
|
</dd>
|
|
<dd>
|
|
{% if r.person.mobilenumber %}
|
|
<i class="fa fa-fw fa-mobile"></i>{{ r.person.mobilenumber }}
|
|
{% else %}
|
|
<i class="fa fa-fw fa-phone"></i>
|
|
{% if r.person.phonenumber %}
|
|
{{ r.person.phonenumber }}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
|
{% endif %}
|
|
{% endif %}
|
|
</dd>
|
|
<dd>
|
|
{%- if r.person.lastAddress is not empty -%}
|
|
{{ address._render(r.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }}
|
|
{%- else -%}
|
|
<i class="fa fa-fw fa-map-marker"></i>
|
|
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
|
{%- endif -%}
|
|
</dd>
|
|
|
|
</dl>
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_person_view', { person_id: r.person.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
|
|
</li>
|
|
</ul>
|
|
|
|
{% endif %}
|
|
{% if r.thirdParty %}
|
|
|
|
<h5>
|
|
{{ r.thirdParty.name }}
|
|
<span class="badge badge-pill badge-light">{{ 'Tiers' }}</span>
|
|
</h5>
|
|
<dl class="content-bloc">
|
|
|
|
<dd>
|
|
<i class="fa fa-fw fa-phone"></i>{{ r.thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}
|
|
</dd>
|
|
<dd>
|
|
<i class="fa fa-fw fa-envelope-o"></i>
|
|
<a href="{{ 'mailto:' ~ r.thirdParty.email }}">
|
|
{{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
|
</a>
|
|
</dd>
|
|
<dd>
|
|
{% if r.thirdParty.address == null %}
|
|
<i class="fa fa-fw fa-map-marker"></i><span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
|
{% else %}
|
|
{{ address._render(r.thirdParty.address, {'with_valid_from': false, 'with_icon': true }) }}
|
|
{% endif %}
|
|
</dd>
|
|
|
|
</dl>
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.thirdParty.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
|
|
</li>
|
|
</ul>
|
|
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<h2>{{ 'Social actions'|trans }}</h2>
|
|
|
|
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
|
|
|
|
|
|
{# ==> insert accompanyingCourse vue component #}
|
|
<div id="accompanying-course"></div>
|
|
{% endblock %}
|