From f339cf56d67239e7cb01cd2bb02d7277bc7f82b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 14 Jun 2022 21:24:28 +0200 Subject: [PATCH] notify the referrer from an activity page or list --- .../Resources/views/Activity/list.html.twig | 30 +++++++++++++++---- .../Resources/views/Activity/show.html.twig | 27 +++++++++++++++-- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index f8b68eabd..79c946f17 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -2,12 +2,30 @@ {% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %} {% if no_action is not defined or no_action == false %}
  • - - - {{ 'notification.Notify'|trans }} + {% set showGroup = activity.accompanyingPeriod is not null and activity.accompanyingPeriod.hasUser and activity.accompanyingPeriod.user is not same as(app.user) %} +
    + {% if showGroup %} + + + {% else %} + + {{ 'notification.Notify'|trans }} + + {% endif %} +
  • {% endif %} {% if context == 'person' and activity.accompanyingPeriod is not empty %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index bf4c5c7b6..49e71bfad 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -217,9 +217,30 @@
  • - - {{ 'notification.Notify'|trans }} - + {% set showGroup = entity.accompanyingPeriod is not null and entity.accompanyingPeriod.hasUser and entity.accompanyingPeriod.user is not same as(app.user) %} +
    + {% if showGroup %} + + + {% else %} + + {{ 'notification.Notify'|trans }} + + {% endif %} +
  • {% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}