Fix display privateComment in activity

This commit is contained in:
Julie Lenaerts 2022-05-02 16:50:24 +02:00
parent ae624d25fc
commit 02a8f5a863
2 changed files with 24 additions and 14 deletions

View File

@ -1,4 +1,5 @@
{%- set t = entity.type -%}
{% set userId = app.user.id %}
{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}
<h1>{{ "Activity"|trans }}</h1>
@ -146,20 +147,6 @@
</dd>
{% endif %}
{% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{% set userID = app.user.id %}
{% if userID in entity.privateComment.comments|keys %}
{% if t.privateCommentLabel is not empty %}
<dt class="inline">{{ t.privateCommentLabel }}</dt>
{% else %}
<dt class="inline">{{ 'activity.private comment'|trans }}</dt>
{% endif %}
<dd>
{{ entity.privateComment.comments[userID]|chill_entity_render_box }}
</dd>
{% endif %}
{% endif %}
{% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'Documents'|trans }}</dt>
<dd>
@ -191,6 +178,25 @@
</div>
</div>
{% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) and userId in entity.privateComment.comments|keys %}
<div class="flex-table">
<div class="item-bloc">
{% if t.privateCommentLabel is not empty %}
<dt class="inline">{{ t.privateCommentLabel }}</dt>
{% else %}
<dt class="inline">{{ 'activity.private comment'|trans }}</dt>
{% endif %}
<dd>
<section class="chill-entity entity-comment-embeddable">
<blockquote class="chill-user-quote private-quote">
{{ entity.privateComment.comments[userId] }}
</blockquote>
</section>
</dd>
</div>
</div>
{% endif %}
<div class="notification notification-list">
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
{% if notifications is not empty %}

View File

@ -277,6 +277,10 @@ table.table-bordered {
}
}
.private-quote {
border-left: 10px solid $pink;
}
/// meta-data
div.createdBy,
div.updatedBy,