rdv: twig layout and field formatting

This commit is contained in:
nobohan
2021-08-19 21:50:52 +02:00
parent 4ae9b29924
commit 3799627bf1
3 changed files with 34 additions and 22 deletions

View File

@@ -11,11 +11,18 @@
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
<dt class="inline">{{ 'start date'|trans }}</dt>
<dd>{{ entity.startDate|format_datetime('long') }}</dd>
<dt class="inline">{{ 'end date'|trans }}</dt>
<dd>{{ entity.endDate|format_datetime('long') }}</dd>
{% if entity.endDate.diff(entity.startDate).days >= 1 %}
<dt>{{ "From the day"|trans }} {{ entity.startDate|format_datetime('medium', 'short') }}
{{ "to the day"|trans }} {{ entity.endDate|format_datetime('medium', 'short') }}
</dt>
<dd></dd>
{% else %}
<dt>
{{ entity.startDate|format_date('full') }},
{{ entity.startDate|format_datetime('none', 'short', locale='fr') }} - {{ entity.endDate|format_datetime('none', 'short', locale='fr') }}
</dt>
<dd></dd>
{% endif %}
<dt class="inline">{{ 'cancel reason'|trans }}</dt>
<dd>