From e0ee817421106107888892db90ea30b36482c852 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 12 Jan 2022 21:34:32 +0100 Subject: [PATCH] batch rename twig attribut --- .../Resources/views/Activity/_list_item.html.twig | 2 +- .../views/Activity/concernedGroups.html.twig | 11 ++++++----- .../Resources/views/Activity/show.html.twig | 2 +- .../views/Calendar/listByAccompanyingCourse.html.twig | 2 +- .../Resources/views/Calendar/show.html.twig | 6 +++--- .../views/AccompanyingCourseWork/index.html.twig | 10 +++++++++- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig index 7b46ffb67..60132e1d0 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig @@ -66,7 +66,7 @@ {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with { 'context': context, - 'with_display': 'wrap-list', + 'render': 'wrap-list', 'entity': activity, 'badge_person': true } %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig index d6d0ed43d..70280d714 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig @@ -3,11 +3,12 @@ {{ path(pathname, parms) }} {% endmacro %} -{% macro insert_onthefly(type, entity) %} +{% macro insert_onthefly(type, entity, parent = null) %} {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: type, id: entity.id }, - buttonText: entity|chill_entity_render_string + buttonText: entity|chill_entity_render_string, + parent: parent } %} {% endmacro %} @@ -59,7 +60,7 @@ }]) %} {% endif %} -{% if (with_display == 'bloc') %} +{% if (render == 'bloc') %}
{% for bloc in blocks %} @@ -90,7 +91,7 @@
{% endif %} -{% if (with_display == 'row') %} +{% if (render == 'row') %}
{% for bloc in blocks %}
@@ -115,7 +116,7 @@
{% endif %} -{% if (with_display == 'wrap-list') %} +{% if (render == 'wrap-list') %}
{% for bloc in blocks %}
diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index 9faacd430..c6e086d4f 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -85,7 +85,7 @@ {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with { 'context': context, - 'with_display': 'bloc', + 'render': 'bloc', 'badge_person': 'true' } %} diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig index 215b7bb55..6cf97a58d 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig @@ -94,7 +94,7 @@
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with { 'context': accompanyingCourse, - 'with_display': 'row', + 'render': 'row', 'entity': calendar } %}
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig index 7c59996d2..3a1bf03d5 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig @@ -6,7 +6,7 @@

{{ 'Concerned groups'|trans }}

-{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %} +{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'render': 'bloc' } %}

{{ 'Calendar data'|trans }}

@@ -108,13 +108,13 @@ {# TODO {% if is_granted('CHILL_ACTIVITY_DELETE', entity) %} #} - +
  • {{ 'Delete'|trans }}
  • - + {# {% endif %} #} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig index ebdfd1f26..254323cfb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig @@ -87,7 +87,15 @@ {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: 'thirdparty', id: w.handlingThierParty.id }, - buttonText: w.handlingThierParty|chill_entity_render_string + buttonText: w.handlingThierParty|chill_entity_render_string, + parent: { + 'type': 'accompanying_period_resource', + 'id': r.id, + 'comment': r.comment, + 'parent': { + 'type': 'accompanying_period', + 'id': accompanyingCourse.id + } } %}