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