mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-22 02:04:24 +00:00
203 lines
9.0 KiB
Twig
203 lines
9.0 KiB
Twig
{#
|
|
# OPTIONS
|
|
# - itemBlocClass: [uniq|colored|extended]
|
|
# - displayContent: [short|long] default: short
|
|
# - displayAction: [true|false] default: false
|
|
#}
|
|
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
|
|
|
<div class="item-row">
|
|
<h2 class="badge-title">
|
|
<span class="title_label"></span>
|
|
<span class="title_action">{{ w.socialAction|chill_entity_render_string }}
|
|
|
|
<ul class="small_in_title columns mt-1">
|
|
<li>
|
|
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
|
<b>{{ w.startDate|format_date('short') }}</b>
|
|
</li>
|
|
{% if w.endDate %}
|
|
<li>
|
|
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
|
<b>{{ w.endDate|format_date('short') }}</b>
|
|
</li>
|
|
{% else %}
|
|
{% if displayContent is defined and displayContent == 'long' %}
|
|
<li>
|
|
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
|
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
|
</li>
|
|
{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
|
|
</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="item-row separator">
|
|
<div class="wrap-list">
|
|
|
|
{%- if w.persons -%}{# Usagers du parcours #}
|
|
<div class="wl-row">
|
|
<div class="wl-col title">
|
|
<h3>{{ 'Persons in accompanying course'|trans }}</h3>
|
|
</div>
|
|
<div class="wl-col list">
|
|
{% for p in w.persons %}
|
|
<span class="wl-item">
|
|
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
|
action: 'show', displayBadge: true,
|
|
targetEntity: { name: 'person', id: p.id },
|
|
buttonText: p|chill_entity_render_string,
|
|
isDead: p.deathdate is not null
|
|
} %}
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{%- if w.handlingThierParty -%}{# Tiers traitant #}
|
|
<div class="wl-row">
|
|
<div class="wl-col title">
|
|
<h3>{{ 'Thirdparty handling'|trans }}</h3>
|
|
</div>
|
|
<div class="wl-col list">
|
|
<span class="wl-item">
|
|
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
|
action: 'show', displayBadge: true,
|
|
targetEntity: { name: 'thirdparty', id: w.handlingThierParty.id },
|
|
buttonText: w.handlingThierParty|chill_entity_render_string
|
|
} %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="wl-row">{# Agents traitants #}
|
|
<div class="wl-col title">
|
|
<h3>{%- if w.referrers|length > 1 -%}{{ 'Referrers'|trans }}{% else %}{{ 'Referrer2'|trans }}{% endif %}</h3>
|
|
</div>
|
|
<div class="wl-col list">
|
|
{%- if w.referrers|length > 0 -%}
|
|
{% for u in w.referrers %}
|
|
<span class="wl-item">
|
|
{{ u|chill_entity_render_box }}
|
|
{% if not loop.last %}, {% endif %}
|
|
</span>
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'No referrer'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{%- if w.socialAction.issue -%}{# Problématique sociale #}
|
|
<div class="wl-row">
|
|
<div class="wl-col title">
|
|
<h3>{{ 'Social issue'|trans }}</h3>
|
|
</div>
|
|
<div class="wl-col list">
|
|
<p class="wl-item social-issues">
|
|
{{ w.socialAction.issue|chill_entity_render_box }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{% if displayContent is not defined or displayContent == 'short' %}
|
|
<div class="item-row column">
|
|
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
|
'displayContent': displayContent
|
|
} %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if displayContent is not defined or displayContent == 'short' %}
|
|
<div class="item-row separator">
|
|
|
|
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
|
|
|
<div class="item-col item-meta">
|
|
{{ macro.metadata(w) }}
|
|
</div>
|
|
|
|
{% if displayAction is defined and displayAction == true %}
|
|
<ul class="item-col record_actions">
|
|
<li>{{ macro.workflowButton(w) }}</li>
|
|
<li>
|
|
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
|
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id }) }}"
|
|
></a>
|
|
</li>
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
|
<li>
|
|
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
|
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
|
></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
|
|
<li>
|
|
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
|
|
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
|
|
></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{#
|
|
# This is for 'long' version of content
|
|
# Note: this include is wrapped in a flex-table container.
|
|
# We start by closing the flex-table so we can add more.
|
|
# At the end we leave the last flex-table open, as it will be closed in the container.
|
|
#}
|
|
{% if displayContent is defined and displayContent == 'long' %}
|
|
</div>
|
|
|
|
{% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
|
<h2 class="chill-blue">{{ 'Dispositifs' }}</h2>
|
|
|
|
<div class="flex-table">{# new flex-table wrapper #}
|
|
<div class="item-bloc colored{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
|
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
|
'displayContent': displayContent
|
|
} %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h2 class="chill-blue">{{ 'Comments'|trans }}</h2>
|
|
|
|
<div class="flex-table">
|
|
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
|
<h3 class="chill-beige">Public</h3>
|
|
{% if w.note is not empty %}
|
|
<blockquote class="chill-user-quote">
|
|
{{ w.note|chill_entity_render_box({'metadata': true }) }}
|
|
</blockquote>
|
|
{% else %}
|
|
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% set userId = app.user.id %}
|
|
{% if w.privateComment.comments|length > 0 and w.privateComment.comments[userId] %}
|
|
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
|
<h3 class="chill-beige">Privé</h3>
|
|
<blockquote class="chill-user-quote private-quote">
|
|
{{ w.privateComment.comments[userId]|chill_markdown_to_html }}
|
|
</blockquote>
|
|
</div>
|
|
{% endif %}
|
|
{# Here flex-table stay open ! read above #}
|
|
|
|
{% endif %} |