mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
render_box: adding addAge option
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* addEntity bool
|
||||
* addId bool
|
||||
* addInfo bool
|
||||
* addAge bool
|
||||
* hLevel integer
|
||||
* customButtons [
|
||||
'before' Twig\Markup, (injected with macro)
|
||||
@@ -60,6 +61,11 @@
|
||||
{{ 'Born the date'|trans({'gender': person.gender,
|
||||
'birthdate': person.birthdate|format_date("medium") }) }}
|
||||
</time>
|
||||
{%- if options['addAge'] -%}
|
||||
<span class="age">
|
||||
{{ person.age ~ ((person.age > 1) ? ' ans' : ' an') }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</p>
|
||||
{%- endif -%}
|
||||
{#- tricks to remove easily whitespace after template -#}
|
||||
|
@@ -5,9 +5,8 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ person|chill_entity_render_box({
|
||||
'render': 'label', 'addInfo': true, 'addId': true, 'hLevel': 1
|
||||
'render': 'label', 'addInfo': true, 'addAge': true, 'addId': true, 'hLevel': 1
|
||||
}) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-auto ps-4 ps-md-2">
|
||||
@@ -68,9 +67,6 @@
|
||||
{% else %}
|
||||
{{ person.birthdate|format_date('short') }}
|
||||
{% endif %}
|
||||
<span class="age">
|
||||
{{ person.age ~ ((person.age > 1) ? ' ans' : ' an') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
|
Reference in New Issue
Block a user