mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
allow layout to print people without dateOfBirth
This commit is contained in:
parent
9f3cf26c13
commit
c66270f1fb
@ -45,7 +45,8 @@ This view should receive those arguments:
|
||||
|
||||
<dl>
|
||||
<dt class="inline">{{ 'views.Person.view.dateOfBirth'|trans }}</dt>
|
||||
<dd>{{ person.dateOfBirth.format(date_format) }}</dd>
|
||||
<dd>{{ person.dateOfBirth.format(date_format)
|
||||
|default( 'person.without_date_of_birth'|trans ) }}</dd>
|
||||
|
||||
|
||||
<dt class="inline">{{ 'views.Person.view.placeOfBirth'|trans }}</dt>
|
||||
|
@ -24,8 +24,16 @@
|
||||
{% endspaceless %}
|
||||
</h1>
|
||||
|
||||
<p class="date detail">{% transchoice person.genreNumeric
|
||||
with {'%date%' : person.dateOfBirth.format('d-m-Y')} %}views.layout.born{% endtranschoice %}</p>
|
||||
<p class="date detail">{% spaceless %}
|
||||
{% if person.dateOfBirth == null %}
|
||||
{{ 'person.without_date_of_birth'|trans }}, {{ ('person.gender.' ~
|
||||
person.genre)|trans }}
|
||||
{% else %}
|
||||
{% transchoice person.genreNumeric
|
||||
with {'%date%' : person.dateOfBirth.format('d-m-Y')} %}views.layout.born{% endtranschoice %}
|
||||
|
||||
{% endif %}
|
||||
{% endspaceless %}</p>
|
||||
{% if person.nationality is not null %}
|
||||
<p class="nationality detail">{{ person.nationality.label }}</p>
|
||||
{% else %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user