From 93128cb61b2e6a80d5773a11c808ada93e7ccad4 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 11 Feb 2022 14:28:42 +0100 Subject: [PATCH] if conditions joined --- .../views/AccompanyingPeriod/_list_item.html.twig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig index 85fef33b0..371423749 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig @@ -26,11 +26,9 @@
- {% if period.closingDate == null %} - {% if period.step != 'DRAFT' %} - {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': period.openingDate|format_date('long') } ) }} - {% endif %} - {% else %} + {% if period.closingDate == null and period.step != 'DRAFT' %} + {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': period.openingDate|format_date('long') } ) }} + {% elseif period.closingDate != null %} {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ '%opening_date%': period.openingDate|format_date('long'), '%closing_date%': period.closingDate|format_date('long')}