Fix error when options['customButtons'] is empty

This commit is contained in:
Marc Ducobu 2021-08-17 15:23:57 +02:00
parent f58be46466
commit a58bdb466c

View File

@ -92,14 +92,16 @@
{{ options['customButtons']['before'] }} {{ options['customButtons']['before'] }}
{% endif %} {% endif %}
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} {% if options['customButtons']['replace'] is defined %}
{{ options['customButtons']['replace'] }}
{% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
<li> <li>
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}" <a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a> href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
</li> </li>
{%- else -%} {% else %}
{{ options['customButtons']['replace'] }} {# rien faire ? j'ai eu un bug car options['customButtons'] était vide (marc) #}
{%- endif -%} {% endif %}
{% if options['customButtons']['after'] is defined %} {% if options['customButtons']['after'] is defined %}
{{ options['customButtons']['after'] }} {{ options['customButtons']['after'] }}