mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
[AccompanyingCourse location] Indicate course location on course index
page
This commit is contained in:
@@ -1,5 +1,38 @@
|
||||
<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 hasPersonLocation = accompanyingCourse.availablePersonLocation|length > 0 -%}
|
||||
<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 hasPersonLocation %}
|
||||
<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 hasPersonLocation %}
|
||||
<div id="locateAtPerson">
|
||||
<form method="GET" action="#">
|
||||
<p>{{ 'Locate by'|trans }}:</p>
|
||||
|
||||
<ul>
|
||||
{% for p in accompanyingCourse.availablePersonLocation %}
|
||||
<li>
|
||||
<input type="radio" name="persons[]" value="{{ p.id }}">
|
||||
{{ p|chill_entity_render_box }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -27,11 +27,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 +49,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 %}
|
||||
|
Reference in New Issue
Block a user