From d4f96ee25f7eefecb8b9f2dfafb5a31461c5aa79 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 24 May 2021 11:22:27 +0200 Subject: [PATCH] add 'with_icon' option in twig address macro --- .../ChillMainBundle/Resources/views/Address/macro.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Address/macro.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Address/macro.html.twig index 5de175169..990dbc043 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Address/macro.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Address/macro.html.twig @@ -1,11 +1,12 @@ {%- macro _render(address, options) -%} {%- set options = { 'with_valid_from' : true }|merge(options|default({})) -%} {%- set options = { 'has_no_address' : false }|merge(options|default({})) -%} + {%- set options = { 'with_icon' : false }|merge(options|default({})) -%}
{% if options['has_no_address'] == true and address.isNoAddress == true %}
{{ 'address.consider homeless'|trans }}
{% endif %} -
+
{% if options['with_icon'] == true %}{% endif %} {% if address.street is not empty %}

{{ address.street }}

{% endif %} {% if address.streetNumber is not empty %}

{{ address.streetNumber }}

{% endif %} {% if address.postCode is not empty %}