From 1a0674a20b7beea7f9df4cffb934b23b9dfc93e1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 18:40:57 +0100 Subject: [PATCH] using badges instead of eye for person resource list --- .../views/PersonResource/list.html.twig | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index 922c369e7..62b9701ec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -26,20 +26,25 @@
{% if resource.person is not null %}
- {{ resource.person }} - {{ 'person'|trans|capitalize }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: resource.person.id }, + buttonText: resource.person|chill_entity_render_string, + isDead: resource.person.deathdate is not null + } %} +
{% elseif resource.thirdparty is not null %}
- {{ resource.thirdparty }} - - {% if resource.thirdparty.parent is not null %} - {{ 'Contact person'|trans|capitalize }} - {% else %} - {{ 'thirdparty'|trans|capitalize }} - {% endif %} - - + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'thirdparty', id: resource.thirdparty.id }, + buttonText: resource.thirdParty|chill_entity_render_string, + parent: resource.thirdparty.parent + } %} +
{% else %}
@@ -76,25 +81,6 @@ class="btn btn-sm btn-delete" title="{{ 'Delete'|trans }}"> -
  • - {% if resource.person is not null %} - - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - action: 'show', displayBadge: false, - targetEntity: { name: 'person', id: resource.person.id }, - } %} - - {% endif %} - {% if resource.thirdparty is not null %} - - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - action: 'show', displayBadge: false, - targetEntity: { name: 'thirdparty', id: resource.thirdparty.id }, - parent: resource.thirdparty.parent - } %} - - {% endif %} -