twig filter format_date need only one argument

This commit is contained in:
Tchama 2020-09-10 16:00:32 +02:00
parent 20807f637d
commit 448b99a652
4 changed files with 9 additions and 9 deletions

View File

@ -40,17 +40,17 @@
<ul class="record_actions_column">
{% if task.startDate is not null %}
<li title="{{ 'Start'|trans|escape('html_attr') }}">
<i class="fa fa-play" ></i> {{ task.startDate|format_date('medium', 'none') }}
<i class="fa fa-play" ></i> {{ task.startDate|format_date('medium') }}
</li>
{% endif %}
{% if task.warningDate is not null %}
<li title="{{ 'Warning'|trans|escape('html_attr') }}">
<i class="fa fa-exclamation-triangle"></i> {{ task.warningDate|format_date('medium', 'none') }}
<i class="fa fa-exclamation-triangle"></i> {{ task.warningDate|format_date('medium') }}
</li>
{% endif %}
{% if task.endDate is not null %}
<li title="{{ 'End'|trans|escape('html_attr') }}">
<i class="fa fa-hourglass-end"></i> {{ task.endDate|format_date('medium', 'none') }}
<i class="fa fa-hourglass-end"></i> {{ task.endDate|format_date('medium') }}
</li>
{% endif %}
</ul>

View File

@ -62,17 +62,17 @@
{% else %}
{% if task.startDate is not null %}
<dt class="inline">{{ 'Start'|trans }}</dt>
<dd>{{ task.startDate|format_date('long', 'none') }}</dd>
<dd>{{ task.startDate|format_date('long') }}</dd>
{% endif %}
{% if task.endDate is not null %}
<dt class="inline">{{ 'End'|trans }}</dt>
<dd>{{ task.endDate|format_date('long', 'none') }}</dd>
<dd>{{ task.endDate|format_date('long') }}</dd>
{% endif %}
{% if task.warningDate is not null %}
<dt class="inline">{{ 'Warning'|trans }}</dt>
<dd>{{ task.warningDate|format_date('long', 'none') }}</dd>
<dd>{{ task.warningDate|format_date('long') }}</dd>
{% endif %}
{% endif %}

View File

@ -1,6 +1,6 @@
<div>
<h3 class="single-line">
{{ event.datetime|format_date('long', 'none') }}
{{ event.datetime|format_date('long') }}
<span class="task"> / {{ 'Task'|trans }}</span> /
{% if transition is not null %}
<span class="statement">{{ task_workflow_metadata(event.task, 'transition.sentence', transition)|trans({ '%user%': event.author.username }) }}</span>
@ -25,7 +25,7 @@
{% if event.task.endDate is not empty %}
<dt class="inline">{{ 'Task end date'|trans }}</dt>
<dd>{{ event.task.endDate|format_date('medium', 'none') }}</dd>
<dd>{{ event.task.endDate|format_date('medium') }}</dd>
{% endif %}
</dl>
</div>

View File

@ -1,6 +1,6 @@
<div>
<h3 class="single-line">
{{ event.datetime|format_date('long', 'short') }}
{{ event.datetime|format_date('long') }}
<span class="task">
{% if transition is not null %}
<span class="statement">{{ task_workflow_metadata(event.task, 'transition.sentence', transition)|trans({ '%user%': event.author.username }) }}</span>