From 523b60c69a39e3a509ec5f3d8ccda90702483350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 30 Jun 2020 17:33:56 +0200 Subject: [PATCH] [Accompanying period] fix period label in list The template didn't take into account still opened periods. --- CHANGELOG.md | 4 ++++ Resources/views/AccompanyingPeriod/list.html.twig | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d46fa81..9376be5f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,3 +106,7 @@ Version 1.5.13 - [CRUD] override relevant part of the main CRUD template - [CRUD] fix redirection on person view: add a `person_id` to every page redirected. +Master branch +============= + +- [Accompanying period list] Fix period label in list diff --git a/Resources/views/AccompanyingPeriod/list.html.twig b/Resources/views/AccompanyingPeriod/list.html.twig index 135810e4b..968285864 100644 --- a/Resources/views/AccompanyingPeriod/list.html.twig +++ b/Resources/views/AccompanyingPeriod/list.html.twig @@ -21,7 +21,7 @@ {% for accompanying_period in accompanying_periods %} - {% if accompanying_period.isOpen == false %} + {% if accompanying_period.closingDate == null %} {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|localizeddate('long', 'none') } ) }} {% else %} {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ @@ -96,4 +96,4 @@ -{% endblock personcontent %} \ No newline at end of file +{% endblock personcontent %}