mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
closed periods in accordeon + styling
This commit is contained in:
parent
d757e07dfc
commit
0cbcd91c3f
@ -30,6 +30,7 @@ div.list-with-period {
|
||||
|
||||
// override wrap-list
|
||||
div.wrap-list.periods-list {
|
||||
padding-right: 1rem;
|
||||
div.wl-row {
|
||||
flex-wrap: nowrap;
|
||||
div.wl-col {
|
||||
@ -63,6 +64,7 @@ div.list-with-period {
|
||||
}
|
||||
|
||||
div.periods-list {
|
||||
padding-right: 1rem;
|
||||
div.title {
|
||||
text-align: right;
|
||||
div.date {}
|
||||
|
@ -157,7 +157,6 @@
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@ -218,46 +217,54 @@
|
||||
|
||||
{#- 'acps' is for AcCompanyingPeriodS #}
|
||||
{%- set acps = [] %}
|
||||
{%- set acpsClosed = [] %}
|
||||
{%- for acp in person.accompanyingPeriodInvolved %}
|
||||
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', acp) %}
|
||||
{% if acp.step == 'CLOSED' %}
|
||||
{%- set acpsClosed = acpsClosed|merge([acp]) %}
|
||||
{% else %}
|
||||
{%- set acps = acps|merge([acp]) %}
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{# add as requestor #}
|
||||
|
||||
{% if acps|length > 0 %}
|
||||
{% for acp in acps %}
|
||||
{% if acp.step == 'CLOSED' %}
|
||||
<div class="accordion" id="member_{{ acp.id }}">
|
||||
{{ _self.accompanying_period(acp, person) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if acpsClosed|length > 0 %}
|
||||
<div class="accordion" id="member_{{ person.id }}">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading_{{ acp.id }}">
|
||||
<h2 class="accordion-header" id="heading_{{ person.id }}">
|
||||
<button
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapse_{{ acp.id }}"
|
||||
data-bs-target="#collapse_{{ person.id }}"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapse_{{ acp.id }}">
|
||||
aria-controls="collapse_{{ person.id }}">
|
||||
<span class="folded">{{ 'Show closed parcours of %name%'|trans({'%name%': person.firstName ~ " " ~ person.lastName }) }} ({{ 'budget.number of elements'|trans({ 'nb_items': 1 }) }})</span>
|
||||
<span class="unfolded text-secondary">{{ 'Hide closed parcours of %name%'|trans({'%name%': person.firstName ~ " " ~ person.lastName }) }}</span>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="collapse_{{ acp.id }}"
|
||||
<div id="collapse_{{ person.id }}"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="heading_{{ acp.id }}"
|
||||
aria-labelledby="heading_{{ person.id }}"
|
||||
data-bs-parent="#nonCurrent">
|
||||
{% for acp in acpsClosed %}
|
||||
|
||||
{{ _self.accompanying_period(acp, person) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ _self.accompanying_period(acp, person) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user