mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: check for empty command
Use the the EmbeddableComment api for getting comment.
This commit is contained in:
parent
06238c8355
commit
5c413edb32
@ -108,7 +108,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row column">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
@ -116,16 +116,16 @@
|
||||
} %}
|
||||
</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>
|
||||
@ -163,10 +163,10 @@
|
||||
#}
|
||||
{% 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 {
|
||||
@ -175,9 +175,9 @@
|
||||
</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>
|
||||
@ -189,15 +189,14 @@
|
||||
<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] %}
|
||||
{% 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.comments[userId]|chill_markdown_to_html }}
|
||||
{{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Here flex-table stay open ! read above #}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
@ -75,7 +75,7 @@
|
||||
<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>
|
||||
@ -89,7 +89,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
@ -103,7 +103,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
@ -122,15 +122,17 @@
|
||||
</li>
|
||||
</ul>
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
|
||||
<blockquote class="chill-user-quote">{{ e.comment|chill_entity_render_box }}</blockquote>
|
||||
|
||||
|
||||
{% 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 %}
|
||||
|
||||
|
||||
<div class="download mb-4 container">
|
||||
{% if e.documents|length > 0 %}
|
||||
|
||||
|
||||
{% for d in e.documents %}
|
||||
<div class="row">
|
||||
<div class="col text-start">
|
||||
@ -144,12 +146,12 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user