install twig intl-extra, replace localizeddate filter by format_date

This commit is contained in:
Tchama 2020-08-03 11:10:39 +02:00
parent f707a649d1
commit d983247514
5 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@
#}{{ report.id }},{#
#}"{{ report.person|csv_cell }}",{#
#}"{{ report.person.id|csv_cell }}",{#
#}"{{ report.date|localizeddate('short', 'none') }}",{#
#}"{{ report.date|format_date('short', 'none') }}",{#
#}"{{ report.user|csv_cell }}",{#
#}"{{ report.cFGroup.getName(app.request.locale)|csv_cell }}",{#
#}{% for customField in report.cFGroup.activeCustomFields %}{#

View File

@ -41,7 +41,7 @@
<tbody>
{% for report in reports %}
<tr>
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
<td>{% if report.date %}{{ report.date|format_date('long', 'none') }}{% endif %}</td>
<td>{{ report.cFGroup.getName|localize_translatable_string }}</td>
<td>{{ report.scope.name|localize_translatable_string }}</td>
<td>

View File

@ -32,7 +32,7 @@
<dt>{{ 'Circle'|trans }}&nbsp;:</dt>
<dd><span class="scope circle">{{ entity.scope.name|localize_translatable_string }}</span></dd>
<dt>{{ 'Date'|trans }}&nbsp;:</dt>
<dd>{{ entity.date|localizeddate('long', 'none') }}</dd>
<dd>{{ entity.date|format_date('long', 'none') }}</dd>
<dt>{{ 'User'|trans }}&nbsp;:</dt>
<dd>{{ entity.user }}</dd>

View File

@ -34,7 +34,7 @@
{% for report in reports %}
<tr>
<td>{{ report.person }}</td>
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
<td>{% if report.date %}{{ report.date|format_date('long', 'none') }}{% endif %}</td>
<td>{{ report.cFGroup.getName|localize_translatable_string }}</td>
<td>{{ report.scope.name|localize_translatable_string }}</td>
<td><a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View the report' | trans }}</a></td>

View File

@ -1,11 +1,11 @@
<div class="report_entry">
<h3>{{ report.date|localizeddate('long', 'none') }}<span class="report"> / {{ 'Report'|trans }}</span></h3>
<h3>{{ report.date|format_date('long', 'none') }}<span class="report"> / {{ 'Report'|trans }}</span></h3>
<div class="statement">
<span class="statement">{{ '%user% has filled a %report_label% report'|trans(
{
'%user%' : user,
'%report_label%': report.CFGroup.name|localize_translatable_string,
'%date%' : report.date|localizeddate('long', 'none') }
'%date%' : report.date|format_date('long', 'none') }
) }}</span>
</div>
{% if custom_fields_in_summary|length > 0 %}