mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
Merge branch 'master' into testing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="alert alert-warning alert-with-actions">
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', accompanyingCourse) %}
|
||||
<div class="action">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
@@ -13,6 +13,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p>{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<div class="alert alert-danger {% if hasPersonLocation %}alert-with-actions{% endif %}">
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', accompanyingCourse) %}
|
||||
<div class="action">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
@@ -14,6 +15,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<p>
|
||||
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}</p>
|
||||
{% if not hasPersonLocation %}
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
|
||||
<div class="item-col item-meta">
|
||||
{% set job_id = null %}
|
||||
{% if period.job is defined %}
|
||||
{% if period.job is not null %}
|
||||
{% set job_id = period.job.id %}
|
||||
{% endif %}
|
||||
<span
|
||||
|
@@ -48,13 +48,57 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for period in accompanying_periods %}
|
||||
{%- 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 ) %}
|
||||
{%- set acpsClosed = acpsClosed|merge([acp]) %}
|
||||
{% else %}
|
||||
{%- set acps = acps|merge([acp]) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for period in acps %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(period, contextEntity)
|
||||
} %}
|
||||
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'Any accompanying periods are open'|trans }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% 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">
|
||||
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for period in acpsClosed %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(period, contextEntity)
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
@@ -65,18 +65,18 @@
|
||||
<h3>{{ 'household.Members at same time'|trans }}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{% set simultaneous = p.household.getMembersDuringMembership(p) %}
|
||||
{% set simultaneous = p.household.getPersonsDuringMembership(p) %}
|
||||
{% if simultaneous|length == 0 %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any simultaneous members'|trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
{% for m in simultaneous -%}
|
||||
{% for person in simultaneous -%}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'person', id: m.person.id },
|
||||
buttonText: m.person|chill_entity_render_string,
|
||||
isDead: m.person.deathdate is not null
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
buttonText: person|chill_entity_render_string,
|
||||
isDead: person.deathdate is not null
|
||||
} %}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
|
@@ -1,13 +1,15 @@
|
||||
{% macro button_person_after(person) %}
|
||||
{% set household = person.getCurrentHousehold %}
|
||||
{% if household is not null %}
|
||||
{% if household is not null and is_granted('CHILL_PERSON_HOUSEHOLD_SEE', household) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_household_summary', { 'household_id': household.id }) }}" class="btn btn-sm btn-chill-beige"><i class="fa fa-home"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_new', { 'person_id': [ person.id ]}) }}" class="btn btn-sm btn-create change-icon" title="{{ 'Create an accompanying period'|trans }}"><i class="fa fa-random"></i></a>
|
||||
</li>
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE', person) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_new', { 'person_id': [ person.id ]}) }}" class="btn btn-sm btn-create change-icon" title="{{ 'Create an accompanying period'|trans }}"><i class="fa fa-random"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro accompanying_period(acp, person) %}
|
||||
@@ -251,7 +253,8 @@
|
||||
{%- set acpsClosed = [] %}
|
||||
{%- for acp in person.accompanyingPeriodInvolved %}
|
||||
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', acp) %}
|
||||
{% if acp.step == 'CLOSED' %}
|
||||
{# filter for "current" periods: either the person is a requestor, or is member of the period and not closed #}
|
||||
{% if acp.step == 'CLOSED' or (acp.requestorPerson is not same as(person) and acp.openParticipationContainsPerson(person) is null ) %}
|
||||
{%- set acpsClosed = acpsClosed|merge([acp]) %}
|
||||
{% else %}
|
||||
{%- set acps = acps|merge([acp]) %}
|
||||
|
Reference in New Issue
Block a user