From f76f7a164104b376389311d7db790a0ac953dca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 4 Jan 2022 17:40:47 +0100 Subject: [PATCH] notification: handle activities --- .../Resources/views/Activity/list.html.twig | 14 +++++++++++++- .../Activity/listAccompanyingCourse.html.twig | 11 +++++++++++ .../views/Activity/listPerson.html.twig | 10 ++++++++++ .../Resources/views/Activity/show.html.twig | 19 +++++++++++-------- .../Activity/showAccompanyingCourse.html.twig | 10 ++++++++++ .../views/Activity/showPerson.html.twig | 10 ++++++++++ .../views/AccompanyingCourse/index.html.twig | 1 - 7 files changed, 65 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index 3f49e67cc..5c5e135b3 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -141,7 +141,7 @@ {% endif %} - + {# Only if ACL SEE_DETAILS AND/OR only on template SHOW ?? durationTime travelTime @@ -152,8 +152,20 @@ + {% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', activity.id) %} + {% if notifications is not empty %} +
+ {{ notifications|raw }} +
+ {% endif %} +
- diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showAccompanyingCourse.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showAccompanyingCourse.html.twig index b74b315a3..bf3728280 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showAccompanyingCourse.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showAccompanyingCourse.html.twig @@ -4,6 +4,16 @@ {% block title 'Show the activity'|trans %} +{% block js %} + {{ parent() }} + {{ encore_entry_script_tags('mod_notification_toggle_read_status') }} +{% endblock %} + +{% block css %} + {{ parent() }} + {{ encore_entry_link_tags('mod_notification_toggle_read_status') }} +{% endblock %} + {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} {% block content -%} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showPerson.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showPerson.html.twig index 5e92f8fa2..c90b069ed 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/showPerson.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/showPerson.html.twig @@ -4,6 +4,16 @@ {% block title 'Show the activity'|trans %} +{% block js %} + {{ parent() }} + {{ encore_entry_script_tags('mod_notification_toggle_read_status') }} +{% endblock %} + +{% block css %} + {{ parent() }} + {{ encore_entry_link_tags('mod_notification_toggle_read_status') }} +{% endblock %} + {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} {% block personcontent -%} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index 821b80b12..11445270a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -22,7 +22,6 @@ {% block css %} {{ parent() }} {{ encore_entry_link_tags('mod_notification_toggle_read_status') }} - {% endblock %} {% block content %}