mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'issue574_accordeon_parcours' into 'master'
Accordeon for closed parcours in person search results See merge request Chill-Projet/chill-bundles!413
This commit is contained in:
commit
217f95472b
@ -13,6 +13,7 @@ and this project adheres to
|
|||||||
<!-- write down unreleased development here -->
|
<!-- write down unreleased development here -->
|
||||||
* [Datepickers] datepickers fixed when using keyboard to enter date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/545)
|
* [Datepickers] datepickers fixed when using keyboard to enter date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/545)
|
||||||
* [social_action] Display 'agents traitants' in parcours resumé and social action list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/568)
|
* [social_action] Display 'agents traitants' in parcours resumé and social action list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/568)
|
||||||
|
* [Person_search] Closed parcours shown within an accordeon that can be opened/closed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/574)
|
||||||
|
|
||||||
## Test releases
|
## Test releases
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
// Chill forms
|
// Chill forms
|
||||||
@import './scss/forms';
|
@import './scss/forms';
|
||||||
|
|
||||||
|
// Extend bootstrap accordion
|
||||||
|
@import './scss/accordion';
|
||||||
|
|
||||||
// Chill record_actions
|
// Chill record_actions
|
||||||
@import './scss/record_actions';
|
@import './scss/record_actions';
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
.accordion {
|
||||||
|
// show a folded / label on accordion
|
||||||
|
button[aria-expanded="true"] > span.folded,
|
||||||
|
button[aria-expanded="false"] > span.unfolded { display: none; }
|
||||||
|
button[aria-expanded="false"] > span.folded,
|
||||||
|
button[aria-expanded="true"] > span.unfolded { display: inline; }
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
}
|
@ -30,6 +30,7 @@ div.list-with-period {
|
|||||||
|
|
||||||
// override wrap-list
|
// override wrap-list
|
||||||
div.wrap-list.periods-list {
|
div.wrap-list.periods-list {
|
||||||
|
padding-right: 1rem;
|
||||||
div.wl-row {
|
div.wl-row {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
div.wl-col {
|
div.wl-col {
|
||||||
@ -63,6 +64,7 @@ div.list-with-period {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.periods-list {
|
div.periods-list {
|
||||||
|
padding-right: 1rem;
|
||||||
div.title {
|
div.title {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
div.date {}
|
div.date {}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
{% elseif period.step == 'CONFIRMED' %}
|
{% elseif period.step == 'CONFIRMED' %}
|
||||||
<span class="badge bg-primary">{{- 'Confirmed'|trans|upper -}}</span>
|
<span class="badge bg-primary">{{- 'Confirmed'|trans|upper -}}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-primary">{{- 'Closed'|trans|upper -}}</span>
|
<span class="badge bg-danger">{{- 'Closed'|trans|upper -}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,12 +10,6 @@
|
|||||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||||
|
|
||||||
{% if accompanying_periods_old|length > 0 %}
|
{% if accompanying_periods_old|length > 0 %}
|
||||||
<style>
|
|
||||||
button[aria-expanded="true"] > span.folded,
|
|
||||||
button[aria-expanded="false"] > span.unfolded { display: none; }
|
|
||||||
button[aria-expanded="false"] > span.folded,
|
|
||||||
button[aria-expanded="true"] > span.unfolded { display: inline; }
|
|
||||||
</style>
|
|
||||||
<div class="accordion" id="nonCurrent">
|
<div class="accordion" id="nonCurrent">
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header" id="heading_{{ household.id }}">
|
<h2 class="accordion-header" id="heading_{{ household.id }}">
|
||||||
|
@ -191,12 +191,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if old_members|length > 0 %}
|
{% if old_members|length > 0 %}
|
||||||
<style>
|
|
||||||
button[aria-expanded="true"] > span.folded,
|
|
||||||
button[aria-expanded="false"] > span.unfolded { display: none; }
|
|
||||||
button[aria-expanded="false"] > span.folded,
|
|
||||||
button[aria-expanded="true"] > span.unfolded { display: inline; }
|
|
||||||
</style>
|
|
||||||
<div class="accordion" id="nonCurrent">
|
<div class="accordion" id="nonCurrent">
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header" id="heading_{{ p == '_none' ? '_none' : p.id }}">
|
<h2 class="accordion-header" id="heading_{{ p == '_none' ? '_none' : p.id }}">
|
||||||
|
@ -10,71 +10,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
<div class="list-with-period">
|
{% macro accompanying_period(acp, person) %}
|
||||||
|
|
||||||
<h2>{{ title|default('Person search results')|trans }}</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
|
||||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
|
||||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ pattern }}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
|
||||||
|
|
||||||
<ul class="record_actions">
|
|
||||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('chill_person_new', { "_fragment": pattern }) }}" class="btn btn-create">
|
|
||||||
{{ 'Add a person'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if search_name != "person_similarity" %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
|
||||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
|
|
||||||
{{ 'Advanced search'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if preview == true and persons | length < total %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
|
||||||
{{ 'See all results'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% if persons|length > 0 %}
|
|
||||||
<div class="flex-table">
|
|
||||||
{% for person in persons %}
|
|
||||||
<div class="item-bloc">
|
|
||||||
|
|
||||||
{{ person|chill_entity_render_box({
|
|
||||||
'render': 'bloc',
|
|
||||||
'addLink': true,
|
|
||||||
'addInfo': true,
|
|
||||||
'addAge': true,
|
|
||||||
'addAltNames': true,
|
|
||||||
'addCenter': true,
|
|
||||||
'address_multiline': false,
|
|
||||||
'customButtons': { 'after': _self.button_person_after(person) }
|
|
||||||
}) }}
|
|
||||||
|
|
||||||
{#- 'acps' is for AcCompanyingPeriodS #}
|
|
||||||
{%- set acps = [] %}
|
|
||||||
{%- for acp in person.accompanyingPeriodInvolved %}
|
|
||||||
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', acp) %}
|
|
||||||
{%- set acps = acps|merge([acp]) %}
|
|
||||||
{%- endif %}
|
|
||||||
{%- endfor %}
|
|
||||||
{# add as requestor #}
|
|
||||||
|
|
||||||
{% if acps|length > 0 %}
|
|
||||||
{% for acp in acps %}
|
|
||||||
{% set app = person.findParticipationForPeriod(acp) %}
|
{% set app = person.findParticipationForPeriod(acp) %}
|
||||||
<div class="item-row separator">
|
<div class="item-row separator">
|
||||||
<div class="wrap-list periods-list">
|
<div class="wrap-list periods-list">
|
||||||
@ -118,7 +54,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if acp.step == 'CLOSED' %}
|
{% if acp.step == 'CLOSED' %}
|
||||||
<span class="badge bg-secondary" style="font-size: 85%;" title="{{ 'course.closed'|trans }}">{{ 'course.closed'|trans }}</span>
|
<span class="badge bg-danger" style="font-size: 85%;" title="{{ 'course.closed'|trans }}">{{ 'course.closed'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -221,12 +157,113 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
</div>
|
<div class="list-with-period">
|
||||||
</div>
|
|
||||||
|
<h2>{{ title|default('Person search results')|trans }}</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||||
|
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||||
|
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||||
|
|
||||||
|
<ul class="record_actions">
|
||||||
|
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_person_new', { "_fragment": pattern }) }}" class="btn btn-create">
|
||||||
|
{{ 'Add a person'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if search_name != "person_similarity" %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||||
|
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
|
||||||
|
{{ 'Advanced search'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if preview == true and persons | length < total %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||||
|
{{ 'See all results'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% if persons|length > 0 %}
|
||||||
|
<div class="flex-table">
|
||||||
|
{% for person in persons %}
|
||||||
|
<div class="item-bloc">
|
||||||
|
|
||||||
|
{{ person|chill_entity_render_box({
|
||||||
|
'render': 'bloc',
|
||||||
|
'addLink': true,
|
||||||
|
'addInfo': true,
|
||||||
|
'addAge': true,
|
||||||
|
'addAltNames': true,
|
||||||
|
'addCenter': true,
|
||||||
|
'address_multiline': false,
|
||||||
|
'customButtons': { 'after': _self.button_person_after(person) }
|
||||||
|
}) }}
|
||||||
|
|
||||||
|
{#- '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 %}
|
||||||
|
{{ _self.accompanying_period(acp, person) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if acpsClosed|length > 0 %}
|
||||||
|
<div class="accordion" id="member_{{ person.id }}">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<h2 class="accordion-header" id="heading_{{ person.id }}">
|
||||||
|
<button
|
||||||
|
class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse_{{ person.id }}"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse_{{ person.id }}">
|
||||||
|
<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 }}"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
aria-labelledby="heading_{{ person.id }}"
|
||||||
|
data-bs-parent="#nonCurrent">
|
||||||
|
{% for acp in acpsClosed %}
|
||||||
|
{{ _self.accompanying_period(acp, person) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,3 +114,19 @@ household_composition:
|
|||||||
few {# enfants dans le ménage}
|
few {# enfants dans le ménage}
|
||||||
other {# enfants dans le ménage}
|
other {# enfants dans le ménage}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
periods:
|
||||||
|
show closed periods: >-
|
||||||
|
{nb_items, plural,
|
||||||
|
=0 {Aucun parcours clôturé}
|
||||||
|
one {Montrer un parcours clôturé}
|
||||||
|
many {Montrer # parcours clôturés}
|
||||||
|
other {Montrer # parcours clôturés}
|
||||||
|
}
|
||||||
|
hide closed periods: >-
|
||||||
|
{nb_items, plural,
|
||||||
|
=0 {Aucun parcours clôturé}
|
||||||
|
one {Masquer un parcours clôturé}
|
||||||
|
many {Masquer # parcours clôturés}
|
||||||
|
other {Masquer # parcours clôturés}
|
||||||
|
}
|
||||||
|
@ -465,6 +465,9 @@ fix it: Compléter
|
|||||||
accompanying_course:
|
accompanying_course:
|
||||||
administrative_location: Localisation administrative
|
administrative_location: Localisation administrative
|
||||||
comment is pinned: Le commentaire est épinglé
|
comment is pinned: Le commentaire est épinglé
|
||||||
|
show: Montrer
|
||||||
|
hide: Masquer
|
||||||
|
closed periods: parcours clôturer
|
||||||
|
|
||||||
# Accompanying Course comments
|
# Accompanying Course comments
|
||||||
Accompanying Course Comment: Commentaire
|
Accompanying Course Comment: Commentaire
|
||||||
|
Loading…
x
Reference in New Issue
Block a user