From fded08aaaab526e7554022a8dd07af8a6d1153eb Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Jan 2022 16:01:22 +0100 Subject: [PATCH] include Activity in notification (ShowInNotification) --- .../views/Activity/showInNotification.html.twig | 17 ++++++++++++----- .../AccompanyingPeriod/_list_item.html.twig | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig index fc39696bf..721538271 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showInNotification.html.twig @@ -1,11 +1,18 @@ -{# available variables: notification, activity #} +{% macro recordAction(activity) %} +
  • + +
  • +{% endmacro %} + {% if activity is not null %}
    {% if is_granted('CHILL_ACTIVITY_SEE', activity) %} - - Go to Activity - - + {% include 'ChillActivityBundle:Activity:_list_item.html.twig' with { + 'recordAction': _self.recordAction(activity), + 'context': 'accompanyingCourse', + 'itemBlocClass': 'bg-chill-llight-gray' + } %} {% else %}
    {{ 'This is the minimal activity data'|trans ~ ': ' ~ activity.id }}
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig index 165e85c62..79e159596 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig @@ -1,4 +1,4 @@ -
    +