mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<div id="withoutHouseholdList" class="collapse p-3">
|
||||
<form method="GET"
|
||||
action="{{ chill_path_add_return_path('chill_person_household_members_editor') }}">
|
||||
action="{{ path('chill_person_household_members_editor') }}">
|
||||
|
||||
<h3>{{ 'household.Select people to move'|trans }}</h3>
|
||||
<ul>
|
||||
@@ -27,6 +27,7 @@
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="expand_suggestions" value="true" />
|
||||
<input type="hidden" name="returnPath" value="{{ app.request.requestUri|escape('html_attr') }}" />
|
||||
<input type="hidden" name="accompanying_period_id" value="{{ accompanyingCourse.id }}" />
|
||||
<ul class="record_actions mb-0">
|
||||
<li>
|
||||
|
@@ -1,5 +1,61 @@
|
||||
<div class="alert alert-danger alert-with-actions mb-0">
|
||||
<div class="message">
|
||||
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
|
||||
{%- set countPersonLocation = accompanyingCourse.availablePersonLocation|length -%}
|
||||
{%- set hasPersonLocation = countPersonLocation|length > 0 -%}
|
||||
{% macro quickLocationForm(accompanyingCourse, person, whichButton) %}
|
||||
<form method="PATCH" action="{{ path('chill_api_single_accompanying_course__entity', {'id': accompanyingCourse.id, '_format': 'json'}) }}" class="quickLocationForm">
|
||||
<input type="hidden" name="personLocation" value="{{ person.id }}" />
|
||||
<input type="hidden" name="periodId" value="{{ accompanyingCourse.id }}" />
|
||||
{% if whichButton == 'string' %}
|
||||
<button type="submit" class="btn btn-chill-pink">
|
||||
<span class="text-light">{{ 'Locate by'|trans }} {{ person|chill_entity_render_string }}</span>
|
||||
</button>
|
||||
{% elseif whichButton == 'icon' %}
|
||||
<button type="submit" class="btn btn-sm btn-secondary">
|
||||
<i class="fa fa-map-marker"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endmacro %}
|
||||
<div class="border border-danger">
|
||||
<div class="alert alert-danger {% if hasPersonLocation %}alert-with-actions{% endif %} mb-0">
|
||||
<div class="message">
|
||||
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
|
||||
{% if not hasPersonLocation %}
|
||||
{{ 'Associate at least one member with an household, and set an address to this household'|trans }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if 1 == countPersonLocation %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ _self.quickLocationForm(accompanyingCourse, accompanyingCourse.availablePersonLocation.first, 'string') }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elseif 1 < countPersonLocation %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-chill-pink" data-bs-toggle="collapse" href="#locateAtPerson">
|
||||
<i class="fa fa-fw fa-caret-down"></i><span class="text-light">{{ 'Choose a person to locate by'|trans }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if 1 < countPersonLocation %}
|
||||
<div id="locateAtPerson" class="collapse">
|
||||
<p>{{ 'Locate by'|trans }}:</p>
|
||||
|
||||
<div class="flex-table mb-3">
|
||||
{% for p in accompanyingCourse.availablePersonLocation %}
|
||||
<div class="item-bloc">
|
||||
{{ p|chill_entity_render_box({
|
||||
'render': 'bloc', 'addLink': false, 'addInfo': true, 'addAltNames': false, 'customButtons': {
|
||||
'replace': _self.quickLocationForm(accompanyingCourse, p, 'icon')
|
||||
}
|
||||
}) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -15,6 +15,11 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('page_accompanying_course_index_person_locate') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanyingcourse-resume">
|
||||
|
||||
@@ -27,11 +32,6 @@
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
|
||||
<div class="alert alert-danger">
|
||||
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
|
||||
@@ -54,12 +54,29 @@
|
||||
{% if withoutHousehold|length > 0 %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %}
|
||||
{% endif %}
|
||||
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' with {} %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="location mb-5">
|
||||
<h2 class="mb-3">{{ 'Accompanying course location'|trans }}</h2>
|
||||
|
||||
{% if accompanyingCourse.locationStatus == 'person' %}
|
||||
<p>{{ 'This course is located by'|trans }}: {{ accompanyingCourse.personLocation|chill_entity_render_string }}</p>
|
||||
{% elseif accompanyingCourse.locationStatus == 'address' %}
|
||||
<p>{{ 'This course has a temporarily location'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if accompanyingCourse.locationStatus != 'none' %}
|
||||
{{ accompanyingCourse.location|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
|
||||
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' with {} %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="requestor mb-5">
|
||||
<h2 class="mb-3">{{ 'Requestor'|trans }}</h2>
|
||||
{% if accompanyingCourse.requestorPerson is not empty %}
|
||||
|
@@ -17,6 +17,10 @@
|
||||
'layout': '@ChillPerson/menu.html.twig',
|
||||
'args' : { 'accompanyingCourse': accompanyingCourse }
|
||||
}) }}
|
||||
|
||||
{% block block_post_menu %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% extends accompanyingCourse != null ? '@ChillPerson/AccompanyingCourse/layout.html.twig'
|
||||
{% extends accompanyingCourse != null ? '@ChillPerson/AccompanyingCourse/layout.html.twig'
|
||||
: '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title 'household.Edit household members'|trans %}
|
||||
@@ -13,11 +13,12 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.household_members_editor_data = {{ data|json_encode|raw }};
|
||||
window.household_members_editor_expand_suggestions = {{ expandSuggestions }};
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_household_members_editor') }}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
window.household_members_editor_data = {{ data|json_encode|raw }};
|
||||
window.household_members_editor_expand_suggestions = {{ expandSuggestions }};
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_household_members_editor') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
|
Reference in New Issue
Block a user