mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[twig][templates] introduce an option in adress_entity_render to display or not the address details button
This commit is contained in:
parent
dc22c94b95
commit
13feb3b212
@ -64,6 +64,7 @@ section.chill-entity {
|
|||||||
margin: 0.7em 0;
|
margin: 0.7em 0;
|
||||||
p {
|
p {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.delimiter {
|
&.delimiter {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* has_no_address bool
|
* has_no_address bool
|
||||||
* multiline bool multiline display
|
* multiline bool multiline display
|
||||||
* extended_infos bool add extra informations (step, floor, etc.) DEPRECATED
|
* extended_infos bool add extra informations (step, floor, etc.) DEPRECATED
|
||||||
|
* details_button bool add an address details button
|
||||||
|
|
||||||
#}
|
#}
|
||||||
|
|
||||||
@ -79,7 +80,12 @@
|
|||||||
<i class="fa fa-fw fa-map-marker"></i>
|
<i class="fa fa-fw fa-map-marker"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ _self.inline(address, options, streetLine, lines) }}
|
{{ _self.inline(address, options, streetLine, lines) }}
|
||||||
<span data-address-details="1" data-address-id="{{ address.id|escape('html_attr') }}" data-address-ref-status="{{ address.refStatus|escape('html_attr') }}"></span>
|
{% if options['details_button'] is defined and options['details_button'] == true %}
|
||||||
|
<span data-address-details="1"
|
||||||
|
data-address-id="{{ address.id|escape('html_attr') }}"
|
||||||
|
data-address-ref-status="{{ address.refStatus|escape('html_attr') }}">
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
@ -112,7 +118,12 @@
|
|||||||
<i class="fa fa-fw fa-map-marker"></i>
|
<i class="fa fa-fw fa-map-marker"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ _self.raw(lines) }}
|
{{ _self.raw(lines) }}
|
||||||
<p><span data-address-details="1" data-address-id="{{ address.id|escape('html_attr') }}" data-address-ref-status="{{ address.refStatus|escape('html_attr') }}"></span></p>
|
{% if options['details_button'] is defined and options['details_button'] == true %}<p class="mt-3">
|
||||||
|
<span data-address-details="1"
|
||||||
|
data-address-id="{{ address.id|escape('html_attr') }}"
|
||||||
|
data-address-ref-status="{{ address.refStatus|escape('html_attr') }}">
|
||||||
|
</span></p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ _self.validity(address, options) }}
|
{{ _self.validity(address, options) }}
|
||||||
|
@ -58,7 +58,8 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<span class=" d-block d-sm-inline-block">
|
<span class=" d-block d-sm-inline-block">
|
||||||
{{ address|chill_entity_render_box({
|
{{ address|chill_entity_render_box({
|
||||||
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
|
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true,
|
||||||
|
'details_button': false
|
||||||
}) }}
|
}) }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -23,7 +23,11 @@
|
|||||||
{% if address is empty %}
|
{% if address is empty %}
|
||||||
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
|
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ address|chill_entity_render_box({'multiline': true, 'extended_infos': true }) }}
|
{{ address|chill_entity_render_box({
|
||||||
|
'multiline': true,
|
||||||
|
'extended_infos': true,
|
||||||
|
'details_button': true
|
||||||
|
}) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<ul class="list-inline text-right mt-2">
|
<ul class="list-inline text-right mt-2">
|
||||||
|
@ -55,7 +55,8 @@
|
|||||||
<span class="col-md-auto address">
|
<span class="col-md-auto address">
|
||||||
{%- if address is not null -%}
|
{%- if address is not null -%}
|
||||||
{{ address|chill_entity_render_box({
|
{{ address|chill_entity_render_box({
|
||||||
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
|
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true,
|
||||||
|
'details_button': false
|
||||||
}) }}
|
}) }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% if person.getCurrentHousehold is not null %}
|
{% if person.getCurrentHousehold is not null %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user