mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +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 %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{# WARNING: this list is rendered in either person context or houshold context #}
|
||||||
|
|
||||||
{%- set acps = [] %}
|
{%- set acps = [] %}
|
||||||
{%- set acpsClosed = [] %}
|
{%- set acpsClosed = [] %}
|
||||||
{% for acp in accompanying_periods %}
|
{% 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]) %}
|
{%- set acpsClosed = acpsClosed|merge([acp]) %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{%- set acps = acps|merge([acp]) %}
|
{%- set acps = acps|merge([acp]) %}
|
||||||
@ -69,24 +72,30 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if acpsClosed|length > 0 %}
|
{% 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">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header" id="heading_{{ person.id }}">
|
<h2 class="accordion-header" id="heading_{{ identifier }}">
|
||||||
<button
|
<button
|
||||||
class="accordion-button collapsed"
|
class="accordion-button collapsed"
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
data-bs-target="#collapse_{{ person.id }}"
|
data-bs-target="#collapse_{{ identifier }}"
|
||||||
aria-expanded="false"
|
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="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>
|
<span class="unfolded text-secondary">{{ 'periods.hide closed periods'|trans({ 'nb_items': acpsClosed|length }) }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div id="collapse_{{ person.id }}"
|
<div id="collapse_{{ identifier }}"
|
||||||
class="accordion-collapse collapse"
|
class="accordion-collapse collapse"
|
||||||
aria-labelledby="heading_{{ person.id }}"
|
aria-labelledby="heading_{{ identifier }}"
|
||||||
data-bs-parent="#nonCurrent">
|
data-bs-parent="#nonCurrent">
|
||||||
|
|
||||||
<div class="flex-table accompanyingcourse-list">
|
<div class="flex-table accompanyingcourse-list">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user