mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fixed: rendering of course in list of courses by household
This commit is contained in:
parent
5896a77ae9
commit
8809abedf6
@ -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 @@
|
||||
</div>
|
||||
|
||||
{% if acpsClosed|length > 0 %}
|
||||
<div class="accordion" id="member_{{ person.id }}">
|
||||
{% if person is defined %}
|
||||
{% set identifier = person.id %}
|
||||
{% else %}
|
||||
{% set identifier = household.id %}
|
||||
{% endif %}
|
||||
|
||||
<div class="accordion" id="member_{{ identifier }}">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading_{{ person.id }}">
|
||||
<h2 class="accordion-header" id="heading_{{ identifier }}">
|
||||
<button
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapse_{{ person.id }}"
|
||||
data-bs-target="#collapse_{{ identifier }}"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapse_{{ person.id }}">
|
||||
aria-controls="collapse_{{ identifier }}">
|
||||
<span class="folded">{{ 'periods.show closed periods'|trans({ 'nb_items': acpsClosed|length }) }}</span>
|
||||
<span class="unfolded text-secondary">{{ 'periods.hide closed periods'|trans({ 'nb_items': acpsClosed|length }) }}</span>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapse_{{ person.id }}"
|
||||
<div id="collapse_{{ identifier }}"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="heading_{{ person.id }}"
|
||||
aria-labelledby="heading_{{ identifier }}"
|
||||
data-bs-parent="#nonCurrent">
|
||||
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
|
Loading…
x
Reference in New Issue
Block a user