Commit a767a67d authored by Julien Fastré's avatar Julien Fastré
Browse files

localize date in report bundles: switch to twig intl extension

refs #272

refs #
Task #272 - Find a way to deal with date format automatically
parent 57e4bc92
......@@ -34,7 +34,7 @@
<tbody>
{% for report in reports %}
<tr>
<td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td>
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
<td>{{ report.cFGroup.getName(app.request.locale) }}</td>
<!-- <td>{{ report.scope }}</td> -->
<td><a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View the report' | trans }}</a></td>
......
......@@ -33,7 +33,7 @@
<!-- <dt class="inline">{{ 'Scope'|trans }}</dt>
<dd>{{ entity.scope }}</dd> -->
<dt class="inline">{{ 'Date'|trans }}</dt>
<dd>{{ entity.date|date('d-m-Y') }}</dd>
<dd>{{ entity.date|localizeddate('long', 'none') }}</dd>
<dt class="inline">{{ 'User'|trans }}</dt>
<dd>{{ entity.user }}</dd>
<dt class="inline">{{ 'Report type'|trans }}</dt>
......
......@@ -33,7 +33,7 @@
{% for report in reports %}
<tr>
<td>{{ report.person }}</td>
<td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td>
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
<td>{{ report.cFGroup.getName|localize_translatable_string }}</td>
<!-- <td>{{ report.scope }}</td> -->
<td><a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View the report' | trans }}</a></td>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment