From d9832475148b6ae6f8157a4132c83a2f43fef3dd Mon Sep 17 00:00:00 2001 From: Tchama Date: Mon, 3 Aug 2020 11:10:39 +0200 Subject: [PATCH] install twig intl-extra, replace localizeddate filter by format_date --- Resources/views/Report/export.csv.twig | 2 +- Resources/views/Report/list.html.twig | 2 +- Resources/views/Report/view.html.twig | 2 +- Resources/views/Search/results.html.twig | 2 +- Resources/views/Timeline/report_person_context.html.twig | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Resources/views/Report/export.csv.twig b/Resources/views/Report/export.csv.twig index e2dcb15c6..b0482afe9 100644 --- a/Resources/views/Report/export.csv.twig +++ b/Resources/views/Report/export.csv.twig @@ -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 %}{# diff --git a/Resources/views/Report/list.html.twig b/Resources/views/Report/list.html.twig index d9d603e10..350c0b0d2 100644 --- a/Resources/views/Report/list.html.twig +++ b/Resources/views/Report/list.html.twig @@ -41,7 +41,7 @@ {% for report in reports %} - {% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %} + {% if report.date %}{{ report.date|format_date('long', 'none') }}{% endif %} {{ report.cFGroup.getName|localize_translatable_string }} {{ report.scope.name|localize_translatable_string }} diff --git a/Resources/views/Report/view.html.twig b/Resources/views/Report/view.html.twig index 286313366..5d80d59e9 100644 --- a/Resources/views/Report/view.html.twig +++ b/Resources/views/Report/view.html.twig @@ -32,7 +32,7 @@
{{ 'Circle'|trans }} :
{{ entity.scope.name|localize_translatable_string }}
{{ 'Date'|trans }} :
-
{{ entity.date|localizeddate('long', 'none') }}
+
{{ entity.date|format_date('long', 'none') }}
{{ 'User'|trans }} :
{{ entity.user }}
diff --git a/Resources/views/Search/results.html.twig b/Resources/views/Search/results.html.twig index 94f0cd0cf..55a93888e 100644 --- a/Resources/views/Search/results.html.twig +++ b/Resources/views/Search/results.html.twig @@ -34,7 +34,7 @@ {% for report in reports %} {{ report.person }} - {% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %} + {% if report.date %}{{ report.date|format_date('long', 'none') }}{% endif %} {{ report.cFGroup.getName|localize_translatable_string }} {{ report.scope.name|localize_translatable_string }} {{ 'View the report' | trans }} diff --git a/Resources/views/Timeline/report_person_context.html.twig b/Resources/views/Timeline/report_person_context.html.twig index 48925ebdc..05a129929 100644 --- a/Resources/views/Timeline/report_person_context.html.twig +++ b/Resources/views/Timeline/report_person_context.html.twig @@ -1,11 +1,11 @@
-

{{ report.date|localizeddate('long', 'none') }} / {{ 'Report'|trans }}

+

{{ report.date|format_date('long', 'none') }} / {{ 'Report'|trans }}

{{ '%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') } ) }}
{% if custom_fields_in_summary|length > 0 %}