From 8809abedf683ffe964e20f29843a77c76cce3a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 12 Jul 2022 18:08:54 +0200 Subject: [PATCH] fixed: rendering of course in list of courses by household --- .../views/AccompanyingPeriod/_list.html.twig | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index 986392056..b140bb4c1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -48,10 +48,13 @@ {% endmacro %} {% block content %} + + {# WARNING: this list is rendered in either person context or houshold context #} + {%- set acps = [] %} {%- set acpsClosed = [] %} {% for acp in accompanying_periods %} - {% if acp.step == 'CLOSED' or (acp.requestorPerson is not same as(person) and acp.openParticipationContainsPerson(person) is null ) %} + {% if acp.step == 'CLOSED' or (person is defined and acp.requestorPerson is not same as(person) and acp.openParticipationContainsPerson(person) is null ) %} {%- set acpsClosed = acpsClosed|merge([acp]) %} {% else %} {%- set acps = acps|merge([acp]) %} @@ -69,24 +72,30 @@ {% if acpsClosed|length > 0 %} -
+ {% if person is defined %} + {% set identifier = person.id %} + {% else %} + {% set identifier = household.id %} + {% endif %} + +
-

+

-