From 94ec165c4c84f534180368bc0e9eb36588e53217 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Dec 2021 14:23:33 +0100 Subject: [PATCH] accompanyingCourse list: display badges as clickable onthefly modal --- CHANGELOG.md | 7 +++-- .../views/AccompanyingPeriod/_list.html.twig | 29 +++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bef98f3e1..20a25edc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,10 +24,13 @@ and this project adheres to * [visgraph] improve and fix bugs on vis-network relationship graph * [bugfix] posting of birth- and deathdate through api fixed. * [suggestions] improve suggestions lists -* [badge-entity] design coherency between badge-person and 3 kinds of badge-thirdparty +* [badge-entity] design coherency between pills badge-person and 3 kinds of badge-thirdparty * [AddPersons] suggestions row are clickable, not only checkbox * [activity] improve show/new/edit templates, fix SEE and SEE_DETAILS acl -* [activity][calendar] concerned groups items are clickable with on-the-fly modal, create specific badge for TMS column +* [badges] create specific badge for TMS, and make person/thirdparty badges clickable with on-the-fly modal in : + * concerned groups items (activity, calendar) + * accompanyingCourseWork lists + * accompanyingCourse lists ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index af8657e28..ebfbed604 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -66,10 +66,22 @@

{{ 'Requestor'|trans({'gender': null }) }}

{% if accompanying_period.requestorPerson is not null %} - {{ accompanying_period.requestorPerson|chill_entity_render_string }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: accompanying_period.requestorPerson.id }, + buttonText: accompanying_period.requestorPerson|chill_entity_render_string + } %} + {% endif %} {% if accompanying_period.requestorThirdParty is not null %} - {{ accompanying_period.requestorThirdParty|chill_entity_render_string }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'thirdparty', id: accompanying_period.requestorThirdParty.id }, + buttonText: accompanying_period.requestorThirdParty|chill_entity_render_string + } %} + {% endif %}
@@ -80,13 +92,12 @@

{{ 'Participants'|trans }}

{% for p in accompanying_period.getCurrentParticipations %} - - - {{ p.person|chill_entity_render_string }} - - {# or in renderbox mode - {{ p.person|chill_entity_render_box({'render': 'label', 'addAltNames': false, 'addLink': true, 'hLevel': 5 }) }} - #} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: p.person.id }, + buttonText: p.person|chill_entity_render_string + } %} {% endfor %}