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