Merge branch 'fix-bug-empty-cb' into 'master'

Fix error when options['customButtons'] is empty

See merge request Chill-Projet/chill-bundles!123
This commit is contained in:
Marc Ducobu 2021-08-17 13:26:13 +00:00
commit f12dc97d57

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'] }}