switching to new syntax

This commit is contained in:
Lucas Silva 2023-03-30 14:31:02 +02:00
parent afb25276ee
commit d8d517017d
6 changed files with 15 additions and 11 deletions

View File

@ -27,7 +27,7 @@ final class AccompanyingPeriodNotificationHandler implements NotificationHandler
public function getTemplate(Notification $notification, array $options = []): string 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 public function getTemplateData(Notification $notification, array $options = []): array

View File

@ -28,7 +28,7 @@ final class AccompanyingPeriodWorkEvaluationDocumentNotificationHandler implemen
public function getTemplate(Notification $notification, array $options = []): string 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 public function getTemplateData(Notification $notification, array $options = []): array

View File

@ -28,7 +28,7 @@ final class AccompanyingPeriodWorkNotificationHandler implements NotificationHan
public function getTemplate(Notification $notification, array $options = []): string 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 public function getTemplateData(Notification $notification, array $options = []): array

View File

@ -5,13 +5,18 @@
</li> </li>
{% endmacro %} {% endmacro %}
{% if document is not null %} {% if document is not null %}
<div class="flex-table"> <div class="flex-table">
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW', document) %} {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW', document) %}
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with { <div class="item-bloc">
'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork, {% include '@ChillPerson/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig' with {
'd': document.storedObject, 'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork,
'displayContent': 'long', 'd': document.storedObject,
} %} 'displayContent': 'short',
'recordAction': _self.recordAction(document)
} %}
</div>
{% else %} {% else %}
<div class="alert alert-warning border-warning border-1"> <div class="alert alert-warning border-warning border-1">
{{ 'This is the minimal period details'|trans ~ ': ' ~ document.id }}<br> {{ 'This is the minimal period details'|trans ~ ': ' ~ document.id }}<br>

View File

@ -7,7 +7,7 @@
{% if work is not null %} {% if work is not null %}
<div class="flex-table"> <div class="flex-table">
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', work) %} {% 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', 'itemBlocClass': 'bg-chill-llight-gray',
'displayAction': true, 'displayAction': true,
'displayContent': 'short', 'displayContent': 'short',

View File

@ -6,10 +6,9 @@
{% endmacro %} {% endmacro %}
{% if period is not null %} {% if period is not null %}
{{ dump(period) }}
<div class="flex-table"> <div class="flex-table">
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', 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), 'recordAction': _self.recordAction(notification.relatedEntityId),
'itemBlocClass': 'bg-chill-llight-gray' 'itemBlocClass': 'bg-chill-llight-gray'
} %} } %}