{% 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 %}
{% if 'DRAFT' == accompanyingCourse.step %}
{% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
{% endif %} {% if 'DRAFT' != accompanyingCourse.step %} {% if withoutHousehold|length > 0 %}
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
{% endif %} {% endif %} {% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
{% endif %}
{% if accompanyingCourse.locationStatus == 'person' %}

{{ 'This course is located by'|trans }}

{{ accompanyingCourse.personLocation|chill_entity_render_string }}

{% elseif accompanyingCourse.locationStatus == 'address' %}

{{ 'This course has a temporarily location'|trans }}

{% endif %} {% if accompanyingCourse.locationStatus != 'none' %} {{ accompanyingCourse.location|chill_entity_render_box }} {% endif %}
{% 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 %}
{% if accompanyingCourse.scopes is not empty %}

{{ 'Scopes'|trans }}

{% for s in accompanyingCourse.scopes %} {{ s.name|localize_translatable_string|capitalize }}{% if not loop.last %}, {% endif %} {% endfor %}

{% else %} {{ 'No scopes'|trans }} {% endif %}
{% if accompanyingCourse.requestorPerson is not null %}

{{ 'Requestor'|trans }}

{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }} {% elseif accompanyingCourse.requestorThirdParty is not null %}

{{ 'Requestor'|trans }}

{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }} {% else %} {{ 'No requestor'|trans }} {% endif %}
{% if accompanyingCourse.participations is not empty %}

{{ 'Persons associated'|trans }}

{% 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 %} {{ 'No participations'|trans }} {% endif %}
{% if accompanyingCourse.resources is not empty %}

{{ 'Resources'|trans }}

{% 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 %} {{ 'No resources'|trans }} {% endif %}
{% endif %}

{{ 'Last social actions'|trans }}

{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
{% block contentActivity %}
{% 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 %}

{{ 'Last activities' |trans }}

{% include 'ChillActivityBundle:Activity:list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
{% endblock %}
{% endblock %}