mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
146 lines
5.8 KiB
Twig
146 lines
5.8 KiB
Twig
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
|
|
|
{% block title %}
|
|
{{ 'Resume Accompanying Course'|trans }}
|
|
{% endblock %}
|
|
|
|
{% macro insert_onthefly(type, entity) %}
|
|
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
|
action: 'show', displayBadge: true,
|
|
targetEntity: { name: type, id: entity.id },
|
|
buttonText: entity|chill_entity_render_string
|
|
} %}
|
|
{% endmacro %}
|
|
|
|
{% block js %}
|
|
{{ parent() }}
|
|
{{ encore_entry_script_tags('page_accompanying_course_index_person_locate') }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="accompanyingcourse-resume row">
|
|
|
|
{% if 'DRAFT' == accompanyingCourse.step %}
|
|
<div class="warnings mb-5">
|
|
{% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if 'DRAFT' != accompanyingCourse.step %}
|
|
{% if withoutHousehold|length > 0 %}
|
|
<div class="warnings mb-5">
|
|
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.locationStatus == 'address'
|
|
or accompanyingCourse.locationStatus == 'none' %}
|
|
<div class="warnings mb-5">
|
|
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="col-md-5 mb-5">
|
|
<div class="location mb-3">
|
|
{% if accompanyingCourse.locationStatus == 'person' %}
|
|
<h2>{{ 'This course is located by'|trans }}</h2>
|
|
<h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4>
|
|
{% elseif accompanyingCourse.locationStatus == 'address' %}
|
|
<h4>{{ 'This course has a temporarily location'|trans }}</h4>
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.locationStatus != 'none' %}
|
|
{{ accompanyingCourse.location|chill_entity_render_box }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if accompanyingCourse.scopes is not empty
|
|
or (accompanyingCourse.requestorThirdParty is not null
|
|
or accompanyingCourse.requestorPerson is not null)
|
|
or accompanyingCourse.participations is not empty
|
|
or accompanyingCourse.resources is not empty
|
|
%}
|
|
<div class="col-md-7 mb-5">
|
|
<div class="scopes mb-3">
|
|
{% if accompanyingCourse.scopes is not empty %}
|
|
<h4 class="item-key">{{ 'Scopes'|trans }}</h4>
|
|
<p>
|
|
{% for s in accompanyingCourse.scopes %}
|
|
<span>{{ s.name|localize_translatable_string|capitalize }}</span>{% if not loop.last %}, {% endif %}
|
|
{% endfor %}
|
|
</p>
|
|
{% else %}
|
|
<span class="chill-no-data-statement visually-hidden">{{ 'No scopes'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="requestor mb-3">
|
|
{% if accompanyingCourse.requestorPerson is not null %}
|
|
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
|
|
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
|
|
{% elseif accompanyingCourse.requestorThirdParty is not null %}
|
|
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
|
|
{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}
|
|
{% else %}
|
|
<span class="chill-no-data-statement visually-hidden">{{ 'No requestor'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="persons mb-3">
|
|
{% if accompanyingCourse.participations is not empty %}
|
|
<h4 class="item-key">{{ 'Persons associated'|trans }}</h4>
|
|
{% for r in accompanyingCourse.participations %}
|
|
{% if r.person is not null %}
|
|
{{ _self.insert_onthefly('person', r.person) }}
|
|
{% elseif r.thirdParty is not null %}
|
|
{{ _self.insert_onthefly('thirdparty', r.thirdParty) }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="chill-no-data-statement visually-hidden">{{ 'No participations'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="resources mb-3">
|
|
{% if accompanyingCourse.resources is not empty %}
|
|
<h4 class="item-key">{{ 'Resources'|trans }}</h4>
|
|
{% for r in accompanyingCourse.resources %}
|
|
{% if r.person is not null %}
|
|
{{ _self.insert_onthefly('person', r.person) }}
|
|
{% elseif r.thirdParty is not null %}
|
|
{{ _self.insert_onthefly('thirdparty', r.thirdParty) }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="chill-no-data-statement visually-hidden">{{ 'No resources'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="social-actions mb-5">
|
|
<h2 class="mb-3 d-none">{{ 'Last social actions'|trans }}</h2>
|
|
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
|
|
</div>
|
|
|
|
{% block contentActivity %}
|
|
<div class="activities mb-5">
|
|
{% set person = null %}
|
|
|
|
{% set person_id = null %}
|
|
{% if person %}
|
|
{% set person_id = person.id %}
|
|
{% endif %}
|
|
|
|
{% set accompanying_course_id = null %}
|
|
{% if accompanyingCourse %}
|
|
{% set accompanying_course_id = accompanyingCourse.id %}
|
|
{% endif %}
|
|
|
|
<h2 class="mb-3 d-none">{{ 'Last activities' |trans }}</h2>
|
|
{% include 'ChillActivityBundle:Activity:list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
</div>
|
|
{% endblock %}
|