mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
192 lines
8.0 KiB
Twig
192 lines
8.0 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') }}
|
|
{{ encore_entry_script_tags('page_accompanying_course_index_masonry') }}
|
|
{{ encore_entry_script_tags('mod_notification_toggle_read_status') }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ parent() }}
|
|
{{ encore_entry_link_tags('mod_notification_toggle_read_status') }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="accompanyingcourse-resume">
|
|
|
|
{{ chill_list_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', accompanyingCourse.id) }}
|
|
|
|
<div id="dashboards" class="row g-3" data-masonry='{"percentPosition": true }'>
|
|
|
|
{% if 'DRAFT' == accompanyingCourse.step %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="warnings">
|
|
{% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if 'DRAFT' != accompanyingCourse.step %}
|
|
{% if withoutHousehold|length > 0 %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="warnings">
|
|
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.locationStatus == 'address'
|
|
or accompanyingCourse.locationStatus == 'none' %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="warnings">
|
|
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="location">
|
|
{% 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.pinnedComment is not empty %}
|
|
<div class="mbloc col col-sm-6 col-lg-8">
|
|
<div class="comment">
|
|
<h4 class="item-key visually-hidden">{{ 'Pinned comment'|trans }}</h4>
|
|
<blockquote class="chill-user-quote">
|
|
<i class="fa fa-flag float-end text-chill-gray" title="{{ 'pinned'|trans }}"></i>
|
|
{{ accompanyingCourse.pinnedComment.content|chill_markdown_to_html }}
|
|
<div class="metadata">
|
|
{{ 'Last updated by'| trans }}
|
|
<span class="user">
|
|
{{ accompanyingCourse.pinnedComment.updatedBy|chill_entity_render_box }}
|
|
</span>
|
|
{{ 'on'|trans ~ ' ' }}
|
|
<span class="date">
|
|
{{ accompanyingCourse.pinnedComment.updatedAt|format_datetime("medium", "short") }}
|
|
</span>
|
|
</div>
|
|
</blockquote>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.participations is not empty %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="persons">
|
|
<h4 class="item-key">{{ 'Persons associated'|trans }}</h4>
|
|
{% for r in accompanyingCourse.participations %}
|
|
{{ _self.insert_onthefly('person', r.person) }}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.resources is not empty %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="resources">
|
|
<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 %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.scopes is not empty %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="scopes">
|
|
<h4 class="item-key">{{ 'Scopes'|trans }}</h4>
|
|
<div>
|
|
{% for s in accompanyingCourse.scopes %}
|
|
<span>{{ s.name|localize_translatable_string|capitalize }}</span>{% if not loop.last %}, {% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="col col-sm-4 col-lg-4 notify mb-4">
|
|
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">{{ 'notification.Notify'|trans }}</a>
|
|
</div>
|
|
|
|
{% if accompanyingCourse.requestorPerson is not null or accompanyingCourse.requestorThirdParty is not null %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="requestor">
|
|
{% 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) }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if accompanyingCourse.origin is not empty %}
|
|
<div class="mbloc col col-sm-6 col-lg-4">
|
|
<div class="origin">
|
|
<h4 class="item-key">{{ 'Origin'|trans }}</h4>
|
|
{{ accompanyingCourse.origin.label|localize_translatable_string|capitalize }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="social-actions my-4">
|
|
<h2 class="mb-3 visually-hidden">{{ 'Last social actions'|trans }}</h2>
|
|
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
|
|
</div>
|
|
|
|
{% block contentActivity %}
|
|
<div class="activities my-4">
|
|
{% 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 visually-hidden">{{ 'Last activities' |trans }}</h2>
|
|
{% include 'ChillActivityBundle:Activity:list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
</div>
|
|
{% endblock %}
|