batch rename twig attribut

This commit is contained in:
Mathieu Jaumotte 2022-01-12 21:34:32 +01:00
parent 630115fd3a
commit e0ee817421
6 changed files with 21 additions and 12 deletions

View File

@ -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
} %}

View File

@ -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') %}
<div class="{{ context }} flex-bloc concerned-groups">
{% for bloc in blocks %}
@ -90,7 +91,7 @@
</div>
{% endif %}
{% if (with_display == 'row') %}
{% if (render == 'row') %}
<div class="concerned-groups">
{% for bloc in blocks %}
<div class="group">
@ -115,7 +116,7 @@
</div>
{% endif %}
{% if (with_display == 'wrap-list') %}
{% if (render == 'wrap-list') %}
<div class="concerned-groups wrap-list">
{% for bloc in blocks %}
<div class="wl-row">

View File

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

View File

@ -94,7 +94,7 @@
<div class="item-col">
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': accompanyingCourse,
'with_display': 'row',
'render': 'row',
'entity': calendar
} %}
</div>

View File

@ -6,7 +6,7 @@
</dl>
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'render': 'bloc' } %}
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
@ -108,13 +108,13 @@
{# TODO
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
#}
<li>
<a href="{{ path('chill_calendar_calendar_delete', { 'id': entity.id, 'accompanying_period_id': accompanying_course_id, 'user_id': user_id } ) }}" class="btn btn-delete">
{{ 'Delete'|trans }}
</a>
</li>
{#
{% endif %}
#}

View File

@ -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
}
} %}
</span>
</div>