mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[Fix] Case where two evaluation showed in the same time in notification
This commit is contained in:
parent
0a2f41c8a0
commit
71e8e2baee
@ -115,7 +115,8 @@
|
||||
<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
|
||||
'displayContent': displayContent,
|
||||
'onlyone': false
|
||||
} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -195,7 +196,8 @@
|
||||
<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
|
||||
'displayContent': displayContent,
|
||||
'onlyone' : false
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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,7 +65,9 @@
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if onlyone %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% if evalId is defined and evalId == e.id %}
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
@ -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,11 +131,99 @@
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% 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 %}
|
||||
@ -140,7 +237,8 @@
|
||||
{% 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>
|
||||
<blockquote
|
||||
class="chill-user-quote">{{ e.comment|chill_entity_render_box }}</blockquote>
|
||||
{% endif %}
|
||||
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
@ -171,6 +269,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
@ -23,7 +23,9 @@
|
||||
'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork,
|
||||
'd': document.storedObject,
|
||||
'displayContent': 'short',
|
||||
'recordAction': _self.recordAction(document)
|
||||
'recordAction': _self.recordAction(document),
|
||||
'onlyone' : true,
|
||||
'evalId': document.accompanyingPeriodWorkEvaluation.id
|
||||
} %}
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user