mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
150 lines
6.0 KiB
Twig
150 lines
6.0 KiB
Twig
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
|
|
|
{% block title %}
|
|
{{ 'Resume Accompanying Course'|trans }}
|
|
{% endblock %}
|
|
|
|
{% macro button_person(person) %}
|
|
{% if person.isSharingHousehold %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}"
|
|
class="btn btn-sm btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}">
|
|
<i class="fa fa-home"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
<div class="accompanyingcourse-resume">
|
|
|
|
{% if 'DRAFT' == accompanyingCourse.step %}
|
|
<div class="col-8 alert alert-danger flash_message mb-5">
|
|
<span>
|
|
{{ 'This accompanying course is still a draft'|trans }}
|
|
<a href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id } ) }}">
|
|
{{ 'Edit & activate accompanying course'|trans }}
|
|
</a>
|
|
</span>
|
|
</div>
|
|
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none') %}
|
|
<div class="alert alert-danger">
|
|
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
|
|
|
|
<div class="associated-persons mb-5">
|
|
<h2 class="mb-3">{{ 'Associated peoples'|trans }}</h2>
|
|
<div class="flex-table mb-3">
|
|
{% for participation in accompanyingCourse.participations %}
|
|
{% if participation.enddate is null %}
|
|
<div class="item-bloc">
|
|
{{ participation.person|chill_entity_render_box({
|
|
'render': 'bloc', 'addLink': false, 'addInfo': true, 'addAltNames': false,
|
|
'customButtons': { 'before': _self.button_person(participation.person) }
|
|
}) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% if withoutHousehold|length > 0 %}
|
|
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="requestor mb-5">
|
|
<h2 class="mb-3">{{ 'Requestor'|trans }}</h2>
|
|
{% if accompanyingCourse.requestorPerson is not empty %}
|
|
{% set requestor = accompanyingCourse.requestorPerson %}
|
|
{% set info = true %}
|
|
{% elseif accompanyingCourse.requestor is not empty %}
|
|
{% set requestor = accompanyingCourse.requestorThirdParty %}
|
|
{% set info = false %}
|
|
{% endif %}
|
|
{% if accompanyingCourse.requestor == null %}
|
|
<p class="chill-no-data-statement">{{ 'Any requestor to this accompanying course'|trans }}</p>
|
|
{% else %}
|
|
<div class="flex-bloc row row-cols-1 g-0">
|
|
<div class="item-bloc col">
|
|
{{ requestor|chill_entity_render_box({
|
|
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': info, 'addAltNames': false
|
|
}) }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="resources mb-5">
|
|
<h2 class="mb-3">{{ 'Resources'|trans }}</h2>
|
|
{% if accompanyingCourse.resources|length == 0 %}
|
|
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
|
|
{% else %}
|
|
<div class="flex-bloc row row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-xxl-4 g-0">
|
|
{% for r in accompanyingCourse.resources %}
|
|
<div class="item-bloc col">
|
|
{% if r.person %}
|
|
{{ r.person|chill_entity_render_box({
|
|
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': true, 'addAltNames': false
|
|
}) }}
|
|
{% endif %}
|
|
{% if r.thirdParty %}
|
|
{{ r.thirdParty|chill_entity_render_box({
|
|
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': false
|
|
}) }}
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="social-actions mb-5">
|
|
<h2 class="mb-3">{{ 'Social actions'|trans }}</h2>
|
|
{% 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="actions">
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a class="btn btn-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>
|
|
{% endfor %}
|
|
</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>{{ 'Activity list' |trans }}</h2>
|
|
|
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
</div>
|
|
{% endblock %}
|