From 02a8f5a863a0802668041d1dd6c43e68d651fc62 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 2 May 2022 16:50:24 +0200 Subject: [PATCH] Fix display privateComment in activity --- .../Resources/views/Activity/show.html.twig | 34 +++++++++++-------- .../Resources/public/chill/chillmain.scss | 4 +++ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index b6d375933..1cb501817 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -1,4 +1,5 @@ {%- set t = entity.type -%} +{% set userId = app.user.id %} {%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}

{{ "Activity"|trans }}

@@ -146,20 +147,6 @@ {% 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 %} -
{{ t.privateCommentLabel }}
- {% else %} -
{{ 'activity.private comment'|trans }}
- {% endif %} -
- {{ entity.privateComment.comments[userID]|chill_entity_render_box }} -
- {% endif %} - {% endif %} - {% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'Documents'|trans }}
@@ -191,6 +178,25 @@ +{% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) and userId in entity.privateComment.comments|keys %} +
+
+ {% if t.privateCommentLabel is not empty %} +
{{ t.privateCommentLabel }}
+ {% else %} +
{{ 'activity.private comment'|trans }}
+ {% endif %} +
+
+
+ {{ entity.privateComment.comments[userId] }} +
+
+
+ + +{% endif %} +
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %} {% if notifications is not empty %} diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss index 1750533f8..13a82a786 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss @@ -277,6 +277,10 @@ table.table-bordered { } } +.private-quote { + border-left: 10px solid $pink; +} + /// meta-data div.createdBy, div.updatedBy,