show of activity adjusted for private comment

This commit is contained in:
Julie Lenaerts 2022-04-27 11:51:32 +02:00
parent e878960da9
commit 4dc56db018

View File

@ -146,19 +146,18 @@
</dd>
{% endif %}
{% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) and entity.privateComment.userId is same as(app.user.id) %}
{% if t.privateCommentLabel is not empty %}
<dt class="inline">{{ t.privateCommentLabel }}</dt>
{% else %}
<dt class="inline">{{ 'activity.private comment'|trans }}</dt>
{% endif %}
<dd>
{%- if entity.privateComment.empty -%}
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
{%- else -%}
{{ entity.privateComment|chill_entity_render_box }}
{%- endif -%}
</dd>
{% 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) %}