mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 04:53:49 +00:00
Merge remote-tracking branch 'origin/master' into 103-document-page
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
# - displayAction: [true|false] default: false
|
||||
# - displayFontSmall: [true|false] default: false
|
||||
#}
|
||||
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<div
|
||||
class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
|
||||
<div class="item-row">
|
||||
<h2 class="badge-title">
|
||||
@@ -111,9 +112,11 @@
|
||||
</div>
|
||||
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
<div
|
||||
class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent,
|
||||
'onlyone': false
|
||||
} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -121,35 +124,56 @@
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row separator">
|
||||
|
||||
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
||||
{% 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) %}
|
||||
<ul class="item-col record_actions">
|
||||
<li>{{ macro.workflowButton(w) }}</li>
|
||||
{% if displayNotification is defined and displayNotification == true %}
|
||||
<li>
|
||||
<div class="d-grid gap-2 {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}btn-group{% endif %}" {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}role="group"{% endif %}>
|
||||
{% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" title="{{ 'notification.Notify'|trans }}" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id, 'tos': [accompanyingCourse.user.id]}) }}">{{ 'notification.Notify referrer'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id}) }}">{{ 'notification.Notify any'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="btn btn-notify" title="{{ 'notification.Notify'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id}) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
<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 class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'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>
|
||||
{% 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 %}
|
||||
@@ -157,47 +181,51 @@
|
||||
</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.
|
||||
# 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,
|
||||
'onlyone' : false
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<h2 class="chill-blue">{{ 'Dispositifs' }}</h2>
|
||||
<h2 class="chill-blue">{{ 'Comments'|trans }}</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 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>
|
||||
{% if w.privateComment.hasCommentForUser(app.user) %}
|
||||
<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.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</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>
|
||||
{% if w.privateComment.hasCommentForUser(app.user) %}
|
||||
<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.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Here flex-table stay open ! read above #}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@@ -1,7 +1,17 @@
|
||||
{% macro metadata(w) %}
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) %}
|
||||
{% if notif_counter.total > 0 %}
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }}
|
||||
{% macro metadata(w, include_notif_counter = true) %}
|
||||
{% if include_notif_counter == true %}
|
||||
{% set more = [] %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% for d in e.documents %}
|
||||
{% set more = more|merge([{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id}]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, more) %}
|
||||
|
||||
{% if notif_counter.total > 0 %}
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, more) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
|
||||
{{ macro.updatedBy(w) }}
|
||||
@@ -20,4 +30,4 @@
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{{ chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, [], suppEvaluations) }}
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# - displayContent: [short|long] default: short
|
||||
#}
|
||||
{% if w.results|length > 0 %}
|
||||
|
||||
<table class="obj-res-eval">
|
||||
<thead>
|
||||
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
|
||||
@@ -64,9 +65,11 @@
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
<tr>
|
||||
<td class="eval">
|
||||
{% if onlyone|default(false) %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% if evalId is defined and evalId == e.id %}
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
<li>
|
||||
{{ e.evaluation.title|localize_translatable_string }}
|
||||
@@ -78,13 +81,15 @@
|
||||
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.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="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -92,13 +97,15 @@
|
||||
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -107,13 +114,15 @@
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -122,45 +131,166 @@
|
||||
{% if e.timeSpent is not null and e.timeSpent > 0 %}
|
||||
<li>
|
||||
{% set minutes = (e.timeSpent / 60) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span> {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span> {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
|
||||
</li>
|
||||
{% elseif displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
{% endif %}
|
||||
|
||||
{% if e.comment is not empty %}
|
||||
<blockquote class="chill-user-quote">{{ e.comment|chill_entity_render_box }}</blockquote>
|
||||
|
||||
{% endfor %}
|
||||
{% if recordAction is defined %}
|
||||
{{ recordAction }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
<li>
|
||||
{{ e.evaluation.title|localize_translatable_string }}
|
||||
<ul class="columns">
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.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 %}
|
||||
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if e.timeSpent is not null and e.timeSpent > 0 %}
|
||||
<li>
|
||||
{% set minutes = (e.timeSpent / 60) %}
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span> {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
|
||||
</li>
|
||||
{% elseif displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{% if recordAction is defined %}
|
||||
{{ recordAction }}
|
||||
{% endif %}
|
||||
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
|
||||
{% if e.comment is not empty %}
|
||||
<blockquote
|
||||
class="chill-user-quote">{{ e.comment|chill_entity_render_box }}</blockquote>
|
||||
{% endif %}
|
||||
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
{% if e.documents|length > 0 %}
|
||||
<table class="table table-hover align-middle mt-4 mx-auto">
|
||||
{% for d in e.documents %}
|
||||
<tr>
|
||||
<td class="border-0">{{ d.title }}</td>
|
||||
<td class="border-0">{{ mm.mimeIcon(d.storedObject.type) }}</td>
|
||||
<td class="border-0 text-end">
|
||||
{% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-sm btn-notify dropdown-toggle" title="{{ 'notification.Notify'|trans }}"
|
||||
data-bs-toggle="dropdown" aria-expanded="false">
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {
|
||||
'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
||||
'entityId': d.id, 'tos': [accompanyingCourse.user.id]}) }}">{{ 'notification.Notify referrer'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {
|
||||
'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
||||
'entityId': d.id}) }}">{{ 'notification.Notify any'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="btn btn-notify btn-sm"
|
||||
title="{{ 'notification.Notify'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {
|
||||
'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
||||
'entityId': d.id }) }}"></a>
|
||||
{% endif %}
|
||||
|
||||
{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if e.documents|length > 0 %}
|
||||
<table class="table mt-4 mx-auto">
|
||||
{% for d in e.documents %}
|
||||
<tr class="border-0">
|
||||
<td class="border-0">{{ d.title }}</td>
|
||||
<td class="border-0">{{ mm.mimeIcon(d.storedObject.type) }}</td>
|
||||
<td class="border-0 text-end">{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
@@ -26,7 +26,8 @@
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'itemBlocClass': ''
|
||||
'itemBlocClass': '',
|
||||
'displayNotification': true
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@@ -27,7 +27,20 @@
|
||||
'displayContent': 'long',
|
||||
'itemBlocClass': 'uniq extended',
|
||||
} %}
|
||||
<div class="p-3 mt-3">{{ macro.metadata(work) }}</div>
|
||||
<div class="p-3 mt-3">{{ macro.metadata(work, false) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="notification notification-list">
|
||||
{% set more = [] %}
|
||||
{% for e in work.accompanyingPeriodWorkEvaluations %}
|
||||
{% for d in e.documents %}
|
||||
{% set more = more|merge([{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id}]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% set notifications = chill_list_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', work.id, more) %}
|
||||
{% if notifications is not empty %}
|
||||
{{ notifications|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
@@ -36,6 +49,25 @@
|
||||
class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>{{ macro.workflowButton(work) }}</li>
|
||||
<li>
|
||||
<div class="d-grid gap-2 {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}btn-group{% endif %}" {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}role="group"{% endif %}>
|
||||
{% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" title="{{ 'notification.Notify'|trans }}" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id, 'tos': [accompanyingCourse.user.id]}) }}">{{ 'notification.Notify referrer'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}">{{ 'notification.Notify any'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="btn btn-notify" title="{{ 'notification.Notify'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %}
|
||||
<li>
|
||||
<a class="btn btn-edit"
|
||||
@@ -47,7 +79,8 @@
|
||||
<li>
|
||||
<a class="btn btn-delete"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': work.id } ) }}"
|
||||
>{{ 'Delete'|trans }}</a>
|
||||
title = "{{ 'Delete'|trans }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -0,0 +1,134 @@
|
||||
{% if document is not null %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
<div class="flex-table accompanying-course-work">
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW', document) %}
|
||||
{% set doc = document %}
|
||||
<div class="item-bloc evaluation-item bg-chill-llight-gray">
|
||||
<div class="item-row mb-2">
|
||||
<h1>{{ "Document"|trans }}: {{ doc.title }}</h1>
|
||||
</div>
|
||||
<div class="item-row mb-2">
|
||||
<h2 class="badge-title">
|
||||
<span class="title_label"></span>
|
||||
<span class="title_action">
|
||||
{{ evaluation.accompanyingPeriodWork.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>{{ evaluation.accompanyingPeriodWork.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if evaluation.accompanyingPeriodWork.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.accompanyingPeriodWork.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="item-row mb-2">
|
||||
<div class="item-col" style="width: 17%;">
|
||||
<h4 class="title_label">
|
||||
{{ 'Participants'|trans }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="item-col list">
|
||||
{% for p in evaluation.accompanyingPeriodWork.persons %}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: p.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: p|chill_entity_render_string,
|
||||
isDead: p.deathdate is not null
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row column">
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="eval">
|
||||
<h4 class="title_label">
|
||||
{{ 'Évaluation'|trans }}
|
||||
</h4>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
<li class="my-2">
|
||||
{{ evaluation.evaluation.title|localize_translatable_string }}
|
||||
<ul class="columns pt-2">
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if evaluation.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if evaluation.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if evaluation.warningInterval and evaluation.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (evaluation.warningInterval.d + evaluation.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{% if evaluation.createdBy is not null %}
|
||||
<span class="item-key">créé par</span>
|
||||
<b>{{ evaluation.createdBy.username }}</b>
|
||||
{% endif %}
|
||||
{% if evaluation.createdAt is not null %}
|
||||
<span class="item-key">{{ 'le'|trans }}</span>
|
||||
<b>{{ evaluation.createdAt|format_date('short') }}</b>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{% if evaluation.comment %}
|
||||
<blockquote class="chill-user-quote" style="margin-left: 0;">
|
||||
{{ evaluation.comment }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-show"
|
||||
href="{{ path('chill_person_accompanying_period_work_show', { 'id': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork.id }) }}"
|
||||
title="{{ 'See the document'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'This is the minimal period details'|trans ~ ': ' ~ document.id }}<br>
|
||||
{{ 'You are getting a notification for a period you are not allowed to see'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'You are getting a notification for a period which does not exists any more'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
@@ -0,0 +1,30 @@
|
||||
{% macro recordAction(work) %}
|
||||
<li>
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': work.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
{% if work is not null %}
|
||||
<div class="flex-table accompanying-course-work">
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', work) %}
|
||||
{% include "@ChillPerson/AccompanyingCourseWork/_item.html.twig" with {
|
||||
'itemBlocClass': 'bg-chill-llight-gray',
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'displayNotification:':true,
|
||||
'w': work
|
||||
} %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'This is the minimal period details'|trans ~ ': ' ~ work.id }}<br>
|
||||
{{ 'You are getting a notification for a period you are not allowed to see'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'You are getting a notification for a period which does not exists any more'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
@@ -8,7 +8,7 @@
|
||||
{% if period is not null %}
|
||||
<div class="flex-table">
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
{% include "@ChillPerson/AccompanyingPeriod/_list_item.html.twig" with {
|
||||
'recordAction': _self.recordAction(notification.relatedEntityId),
|
||||
'itemBlocClass': 'bg-chill-llight-gray'
|
||||
} %}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<td>{{ entity.ordering }}</td>
|
||||
<td>
|
||||
{% if entity.desactivationDate is not null %}
|
||||
{{ entity.desactivationDate|date('Y-m-d') }}
|
||||
{{ entity.desactivationDate|format_date('medium') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@@ -123,7 +123,7 @@
|
||||
<ul class="record_actions">
|
||||
<li>{{ doc.storedObject|chill_document_button_group(doc.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', evaluation.accompanyingPeriodWork)) }}</li>
|
||||
<li>
|
||||
<a class="btn btn-show" href="{{ path('chill_person_accompanying_period_work_edit', {'id': evaluation.accompanyingPeriodWork.id}) }}">
|
||||
<a class="btn btn-show" href="{{ path('chill_person_accompanying_period_work_edit', {'id': evaluation.accompanyingPeriodWork.id, 'doc_id': doc.id}) }}">
|
||||
{{ 'Show'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user