mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
twig filter format_date need only one argument
This commit is contained in:
parent
33c9cdeaf2
commit
65a5c94c2f
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ 'Last opening since %last_opening%'|trans(
|
{{ 'Last opening since %last_opening%'|trans(
|
||||||
{ '%last_opening%' : accompanying_period.openingDate|format_date('long', 'none') }) }}
|
{ '%last_opening%' : accompanying_period.openingDate|format_date('long') }) }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if form.openingDate is defined %}
|
{% if form.openingDate is defined %}
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% if accompanying_period.closingDate == null %}
|
{% if accompanying_period.closingDate == null %}
|
||||||
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long', 'none') } ) }}
|
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
||||||
'%opening_date%': accompanying_period.openingDate|format_date('long', 'none'),
|
'%opening_date%': accompanying_period.openingDate|format_date('long'),
|
||||||
'%closing_date%': accompanying_period.closingDate|format_date('long', 'none')}
|
'%closing_date%': accompanying_period.closingDate|format_date('long')}
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
{% if accompanying_period.isOpen == false %}
|
{% if accompanying_period.isOpen == false %}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% for address in person.addresses %}
|
{% for address in person.addresses %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>{{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long', 'none') } ) }}</strong></td>
|
<td><strong>{{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long') } ) }}</strong></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{ address_macros._render(address, { 'with_valid_from' : false, 'has_no_address': true } ) }}
|
{{ address_macros._render(address, { 'with_valid_from' : false, 'has_no_address': true } ) }}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
{% endapply %}
|
{% endapply %}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long', 'none', app.request.locale) }}{% else %} {% endif %}</td>
|
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %} {% endif %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
|
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
|
||||||
</td>
|
</td>
|
||||||
@ -69,13 +69,13 @@
|
|||||||
<dd>{{ person|chill_entity_render_string }}</dd>
|
<dd>{{ person|chill_entity_render_string }}</dd>
|
||||||
|
|
||||||
<dt>{{ 'Date of birth'|trans }}</dt>
|
<dt>{{ 'Date of birth'|trans }}</dt>
|
||||||
<dd>{{ birthdate|format_date('long', 'none', app.request.locale)|default( 'Unknown date of birth'|trans ) }}</dd>
|
<dd>{{ birthdate|format_date('long')|default( 'Unknown date of birth'|trans ) }}</dd>
|
||||||
|
|
||||||
<dt>{{ 'Gender'|trans }}</dt>
|
<dt>{{ 'Gender'|trans }}</dt>
|
||||||
<dd>{{ gender|trans }}</dd>
|
<dd>{{ gender|trans }}</dd>
|
||||||
|
|
||||||
<dt>{{ 'Creation date'|trans }}</dt>
|
<dt>{{ 'Creation date'|trans }}</dt>
|
||||||
<dd>{{ creation_date|format_date('long', 'none', app.request.locale) }}</dd>
|
<dd>{{ creation_date|format_date('long') }}</dd>
|
||||||
|
|
||||||
{% if form.altNames is defined %}
|
{% if form.altNames is defined %}
|
||||||
{# mark as rendered #}
|
{# mark as rendered #}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if person.birthdate is not null %}
|
{% if person.birthdate is not null %}
|
||||||
{{ person.birthdate|format_date('long', 'none') }}
|
{{ person.birthdate|format_date('long') }}
|
||||||
{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if person.birthdate is not null %}{{person.birthdate|format_date('long', 'none', app.request.locale) }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
{% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="person-list__--by-phonenumber__phones">
|
<td class="person-list__--by-phonenumber__phones">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -88,7 +88,7 @@ This view should receive those arguments:
|
|||||||
<dt>{{ 'Date of birth'|trans }} :</dt>
|
<dt>{{ 'Date of birth'|trans }} :</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{%- if person.birthdate is not null -%}
|
{%- if person.birthdate is not null -%}
|
||||||
{{ person.birthdate|format_date('long', 'none') }}
|
{{ person.birthdate|format_date('long') }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<span class="chill-no-data-statement">{{ 'Unknown date of birth'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'Unknown date of birth'|trans }}</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<h3 class="single-line">
|
<h3 class="single-line">
|
||||||
{{ period.closingDate|format_date('long', 'none') }}
|
{{ period.closingDate|format_date('long') }}
|
||||||
<span class="person"> /
|
<span class="person"> /
|
||||||
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
|
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
|
||||||
{{ 'Closing the accompanying period' | trans }}
|
{{ 'Closing the accompanying period' | trans }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<h3 class="single-line">
|
<h3 class="single-line">
|
||||||
{{ period.openingDate|format_date('long', 'none') }}
|
{{ period.openingDate|format_date('long') }}
|
||||||
<span class="person"> /
|
<span class="person"> /
|
||||||
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
|
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id': person.id } ) }}">
|
||||||
{{ 'Opening the accompanying period' | trans }}
|
{{ 'Opening the accompanying period' | trans }}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
{% if person.birthdate == null %}
|
{% if person.birthdate == null %}
|
||||||
{{ 'Unknown date of birth'|trans }}
|
{{ 'Unknown date of birth'|trans }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ person.birthdate|format_date('long', 'none') }}
|
{{ person.birthdate|format_date('long') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user