{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %} {% block title %} {{ 'Resume Accompanying Course'|trans }} {% endblock %} {% macro button_person(person) %} {% if person.isSharingHousehold %}
  • {% endif %} {% endmacro %} {% block content %}
    {% if 'DRAFT' == accompanyingCourse.step %}
    {{ 'This accompanying course is still a draft'|trans }} {{ 'Edit & activate accompanying course'|trans }}
    {% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none') %}
    {{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
    {% endif %} {% endif %}

    {{ 'Resume Accompanying Course'|trans }}

    {{ 'Associated peoples'|trans }}

    {% for participation in accompanyingCourse.participations %} {% if participation.enddate is null %}
    {{ participation.person|chill_entity_render_box({ 'render': 'bloc', 'addLink': false, 'addInfo': true, 'addAltNames': false, 'customButtons': { 'before': _self.button_person(participation.person) } }) }}
    {% endif %} {% endfor %}
    {% if withoutHousehold|length > 0 %} {% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %} {% endif %}

    {{ 'Requestor'|trans }}

    {% 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 %}

    {{ 'Any requestor to this accompanying course'|trans }}

    {% else %}
    {{ requestor|chill_entity_render_box({ 'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': info, 'addAltNames': false }) }}
    {% endif %}

    {{ 'Resources'|trans }}

    {% if accompanyingCourse.resources|length == 0 %}

    {{ 'Any resource for this accompanying course'|trans }}

    {% else %}
    {% for r in accompanyingCourse.resources %}
    {% 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 %}
    {% endfor %}
    {% endif %}

    {{ 'Social actions'|trans }}

    {% for w in works %}

    {{ 'accompanying_course_work.action'|trans }}

    {{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}

    {% else %}

    {{ 'accompanying_course_work.Any work'|trans }}

    {% endfor %}
    {% 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 %}

    {{ 'Activity list' |trans }}

    {% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
    {% endblock %}
    {% endblock %}