OnTheFly: adding displayBadge option to replace button by badge

When using displayBadge=true, you need to pass buttonText=string with badge content.

Limitation: onTheFly cannot use directly PersonRenderBox to display badge,
because it don't have person object in props !
This commit is contained in:
2021-10-01 17:38:19 +02:00
parent daa8b03c8b
commit fbd17a1de6
6 changed files with 50 additions and 30 deletions

View File

@@ -24,7 +24,17 @@
<div class="accompanyingcourse-resume row">
<div class="concerned mb-5">
{% include '@ChillPerson/AccompanyingCourse/_concerned.html.twig' with {} %}
{% for p in accompanyingCourse.participations %}
{# include vue_onthefly component #}
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
targetEntity: { name: 'person', id: p.person.id },
action: 'show',
displayBadge: true,
buttonText: p.person|chill_entity_render_string
} %}
{% endfor %}
</div>
<div class="col-md-6 location mb-5">