From d8d517017ddcd03bd85ecc0a21f73f94076384f1 Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Thu, 30 Mar 2023 14:31:02 +0200 Subject: [PATCH] switching to new syntax --- .../AccompanyingPeriodNotificationHandler.php | 2 +- ...dWorkEvaluationDocumentNotificationHandler.php | 2 +- .../AccompanyingPeriodWorkNotificationHandler.php | 2 +- ...showEvaluationDocumentInNotification.html.twig | 15 ++++++++++----- .../showInNotification.html.twig | 2 +- .../showInNotification.html.twig | 3 +-- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php index 486209453..2492e9a41 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php @@ -27,7 +27,7 @@ final class AccompanyingPeriodNotificationHandler implements NotificationHandler public function getTemplate(Notification $notification, array $options = []): string { - return 'ChillPersonBundle:AccompanyingPeriod:showInNotification.html.twig'; + return '@ChillPerson/AccompanyingPeriod/showInNotification.html.twig'; } public function getTemplateData(Notification $notification, array $options = []): array diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php index 1f3ed0fb6..f5ce07c8e 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php @@ -28,7 +28,7 @@ final class AccompanyingPeriodWorkEvaluationDocumentNotificationHandler implemen public function getTemplate(Notification $notification, array $options = []): string { - return 'ChillPersonBundle:AccompanyingCourseWork:showEvaluationDocumentInNotification.html.twig'; + return '@ChillPerson/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig'; } public function getTemplateData(Notification $notification, array $options = []): array diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php index dbb30e983..b111c131f 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php @@ -28,7 +28,7 @@ final class AccompanyingPeriodWorkNotificationHandler implements NotificationHan public function getTemplate(Notification $notification, array $options = []): string { - return 'ChillPersonBundle:AccompanyingCourseWork:showInNotification.html.twig'; + return '@ChillPerson/AccompanyingCourseWork/showInNotification.html.twig'; } public function getTemplateData(Notification $notification, array $options = []): array diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig index 83ba7bf91..f4c9c1bf7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig @@ -5,13 +5,18 @@ {% endmacro %} {% if document is not null %} +
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW', document) %} - {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with { - 'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork, - 'd': document.storedObject, - 'displayContent': 'long', - } %} +
+ {% include '@ChillPerson/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig' with { + 'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork, + 'd': document.storedObject, + 'displayContent': 'short', + 'recordAction': _self.recordAction(document) + } %} +
+ {% else %}
{{ 'This is the minimal period details'|trans ~ ': ' ~ document.id }}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showInNotification.html.twig index 311692030..4ee561381 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showInNotification.html.twig @@ -7,7 +7,7 @@ {% if work is not null %}
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', work) %} - {% include 'ChillPersonBundle:AccompanyingCourseWork:_item.html.twig' with { + {% include "@ChillPerson/AccompanyingCourseWork/_item.html.twig" with { 'itemBlocClass': 'bg-chill-llight-gray', 'displayAction': true, 'displayContent': 'short', diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig index d6d13cd17..37563c947 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig @@ -6,10 +6,9 @@ {% endmacro %} {% if period is not null %} - {{ dump(period) }}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %} - {% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with { + {% include "@ChillPerson/AccompanyingPeriod/_list_item.html.twig" with { 'recordAction': _self.recordAction(notification.relatedEntityId), 'itemBlocClass': 'bg-chill-llight-gray' } %}