mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge branch 'features/improve-accompanying-course-summary' into 'master'
Improve accompanying course summary page See merge request Chill-Projet/chill-bundles!102
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if p.person.lastAddress is not empty -%}
|
||||
{{ p.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{{ p.person.currentHouseholdAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
@@ -113,7 +113,7 @@
|
||||
) }}"
|
||||
class="sc-button">
|
||||
<i class="fa fa-home"></i>
|
||||
{{ 'household.Household file'|trans }}
|
||||
n° {{ p.person.getCurrentHousehold.id }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -125,189 +125,222 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h2>{{ 'Requestor'|trans }}</h2>
|
||||
|
||||
{% if accompanyingCourse.requestor == null %}
|
||||
<p>{{ 'Any requestor to this accompanying course'|trans }}</p>
|
||||
{% elseif accompanyingCourse.requestorPerson is not empty %}
|
||||
{% set r = accompanyingCourse.requestorPerson %}
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.firstname ~ ' ' ~ r.lastname }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
|
||||
</h3>
|
||||
<p>
|
||||
{% set born = (r.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (r.gender == 'woman') ? 'fa-venus' :
|
||||
(r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (r.gender == 'woman') ? 'femme' :
|
||||
(r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if r.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.mobilenumber }}">{{ r.mobilenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if r.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ r.phonenumber }}">{{ r.phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.lastAddress is not empty -%}
|
||||
{{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_view', { person_id: r.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elseif accompanyingCourse.requestorThirdParty is not empty %}
|
||||
{% set r = accompanyingCourse.requestorThirdParty %}
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.name }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ r.email }}">
|
||||
{{ r.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-phone"></i>
|
||||
{% if r.telephone %}
|
||||
<a href="{{ 'tel:' ~ r.telephone }}">{{ r.telephone }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.address is not empty -%}
|
||||
{{ r.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.id }) }}" class="sc-button bt-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Resources'|trans }}</h2>
|
||||
<div class="flex-bloc">
|
||||
{% for r in accompanyingCourse.resources %}
|
||||
<div class="item-bloc">
|
||||
{% if r.person %}
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.person.firstname ~ ' ' ~ r.person.lastname }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
|
||||
</h3>
|
||||
<p>
|
||||
{% 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 == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if r.person.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.person.mobilenumber }}">{{ r.person.mobilenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if r.person.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ r.person.phonenumber }}">{{ r.person.phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.person.lastAddress is not empty -%}
|
||||
{{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
{% if accompanyingCourse.resources|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-bloc">
|
||||
{% for r in accompanyingCourse.resources %}
|
||||
<div class="item-bloc">
|
||||
{% if r.person %}
|
||||
|
||||
{% endif %}
|
||||
{% if r.thirdParty %}
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.person.firstname ~ ' ' ~ r.person.lastname }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Usager' }}</span>
|
||||
</h3>
|
||||
<p>
|
||||
{% 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 == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if r.person.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.person.mobilenumber }}">{{ r.person.mobilenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if r.person.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ r.person.phonenumber }}">{{ r.person.phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.person.lastAddress is not empty -%}
|
||||
{{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.thirdParty.name }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ r.thirdParty.email }}">
|
||||
{{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-phone"></i>
|
||||
{% if r.thirdParty.telephone %}
|
||||
<a href="{{ 'tel:' ~ r.thirdParty.telephone }}">{{ r.thirdParty.telephone }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.thirdParty.address is not empty -%}
|
||||
{{ r.thirdParty.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
{% endif %}
|
||||
{% if r.thirdParty %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.thirdParty.name }}
|
||||
<span class="badge badge-pill badge-secondary">{{ 'Tiers' }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ r.thirdParty.email }}">
|
||||
{{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-phone"></i>
|
||||
{% if r.thirdParty.telephone %}
|
||||
<a href="{{ 'tel:' ~ r.thirdParty.telephone }}">{{ r.thirdParty.telephone }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.thirdParty.address is not empty -%}
|
||||
{{ r.thirdParty.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Social actions'|trans }}</h2>
|
||||
|
||||
<div id="accompanying_course_work_list">
|
||||
<div id="accompanying_course_work_list" class="short">
|
||||
{% for w in works %}
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
|
||||
<h2 class="action_title">
|
||||
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="timeline">
|
||||
<ul class="timeline">
|
||||
<li class="completed">
|
||||
<div class="date">
|
||||
<span>{{ w.createdAt|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.create_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="completed">
|
||||
<div class="date">
|
||||
<span>{{ w.startDate|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.start_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="{%if date(w.endDate) < date('now') %}completed{% endif %}">
|
||||
<div class="date">
|
||||
<span>{{ w.endDate|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.end_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if w.results|length > 0 %}
|
||||
<div class="objective_results objective_results__without-objectives">
|
||||
<div class="obj without_objective">
|
||||
<p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
|
||||
</div>
|
||||
<div class="res results">
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<ul class="result_list">
|
||||
{% for r in w.results %}
|
||||
<li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if w.goals|length > 0 %}
|
||||
{% for g in w.goals %}
|
||||
<div class="objective_results objective_results--with-objectives">
|
||||
<div class="objective obj">
|
||||
<p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
|
||||
<h3 class="goal_title">{{ g.goal.title|localize_translatable_string }}</h3>
|
||||
</div>
|
||||
<div class="results res">
|
||||
{% if g.results|length == 0 %}
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.no_results'|trans }}</p>
|
||||
{% else %}
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<ul class="result_list">
|
||||
{% for r in g.results %}
|
||||
<li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="updatedBy">
|
||||
{{ 'Last updated by'|trans}}: {{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('long', 'short') }}
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
class="sc-button bt-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
@@ -317,7 +350,7 @@
|
||||
|
||||
{% block contentActivity %}
|
||||
{% set person = null %}
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %}
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'accompanyingCourse'} %}
|
||||
{% endblock %}
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
|
Reference in New Issue
Block a user