From 7ffdf4cb1ff39e3f8d89d0087656904750710e14 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 19 Aug 2021 09:59:27 +0200 Subject: [PATCH] render_box person and thirdparty: fix bug customOptions with 'replace' --- .../Resources/views/Entity/person.html.twig | 5 +++-- .../Resources/views/Entity/thirdparty.html.twig | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 18689b4ab..20a9ff221 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -137,13 +137,14 @@ {{ options['customButtons']['before'] }} {% endif %} - {%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%} + {%- if options['customButtons']['replace'] is defined -%} + {{ options['customButtons']['replace'] }} + {%- elseif is_granted('CHILL_PERSON_SEE', person) -%}
  • {%- else -%} - {{ options['customButtons']['replace'] }} {%- endif -%} {% if options['customButtons']['after'] is defined %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 0cd5960bf..b426b50dd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -94,13 +94,12 @@ {% if options['customButtons']['replace'] is defined %} {{ options['customButtons']['replace'] }} - {% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %} + {% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
  • {% else %} - {# rien faire ? j'ai eu un bug car options['customButtons'] était vide (marc) #} {% endif %} {% if options['customButtons']['after'] is defined %}