accourse resume page: add all informations needed for activities

This commit is contained in:
Mathieu Jaumotte 2021-11-27 11:58:17 +01:00
parent 34c525e378
commit d616c20534
4 changed files with 76 additions and 52 deletions

View File

@ -26,23 +26,45 @@
{{ activity.type.name | localize_translatable_string }} {{ activity.type.name | localize_translatable_string }}
<ul class="small_in_title"> {% if activity.emergency %}
{% if activity.location and t.locationVisible %} <span class="badge bg-danger rounded-pill fs-6">{{ 'Emergency'|trans|upper }}</span>
<li> {% endif %}
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span> <ul class="small_in_title mt-3">
{{ activity.location.name }}
</li> {% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<li>
<span class="item-key">{{ 'Sent received'|trans ~ ' : ' }}</span>
<b>{{ activity.sentReceived|capitalize|trans }}</b>
</li>
{% endif %} {% endif %}
{% if activity.location and t.locationVisible %}
<li>
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<b>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span>
{{ activity.location.name }}
</b>
</li>
{% endif %}
{% if activity.user and t.userVisible %} {% if activity.user and t.userVisible %}
<li> <li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span> <span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
{{ activity.user.usernameCanonical }} <b>{{ activity.user.usernameCanonical }}</b>
</li> </li>
{% endif %} {% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in activity.personsAssociated %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
{% endfor %}
</li>
</ul> </ul>
<ul class="list-content"> <ul class="list-content my-3">
{%- if t.reasonsVisible -%} {%- if t.reasonsVisible -%}
{%- if activity.reasons is not empty -%} {%- if activity.reasons is not empty -%}
<li class="reasons"> <li class="reasons">
@ -71,11 +93,9 @@
{%- endif -%} {%- endif -%}
{% endif %} {% endif %}
</ul> </ul>
</span> </span>
</h2> </h2>
{#
{% if context == 'person' and activity.accompanyingPeriod is not empty %} {% if context == 'person' and activity.accompanyingPeriod is not empty %}
<div class="mt-3"> <div class="mt-3">
<a class="btn btn-sm btn-outline-primary" <a class="btn btn-sm btn-outline-primary"
@ -87,4 +107,4 @@
</a> </a>
</div> </div>
{% endif %} {% endif %}
#}

View File

@ -215,6 +215,7 @@ Configure location and location type: Configuration des localisations
# circles / scopes # circles / scopes
Choose the circle: Choisir le cercle Choose the circle: Choisir le cercle
Scopes: Services
#export #export

View File

@ -41,41 +41,52 @@
</div> </div>
{% endif %} {% endif %}
<div class="col-md-5 location mb-5"> <div class="col-md-5 mb-5">
{% if accompanyingCourse.locationStatus == 'person' %} <div class="location mb-3">
<h2>{{ 'This course is located by'|trans }}</h2> {% if accompanyingCourse.locationStatus == 'person' %}
<h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4> <h2>{{ 'This course is located by'|trans }}</h2>
{% elseif accompanyingCourse.locationStatus == 'address' %} <h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4>
<h4>{{ 'This course has a temporarily location'|trans }}</h4> {% elseif accompanyingCourse.locationStatus == 'address' %}
{% endif %} <h4>{{ 'This course has a temporarily location'|trans }}</h4>
{% endif %}
{% if accompanyingCourse.locationStatus != 'none' %} {% if accompanyingCourse.locationStatus != 'none' %}
{{ accompanyingCourse.location|chill_entity_render_box }} {{ accompanyingCourse.location|chill_entity_render_box }}
{% endif %} {% endif %}
<!--
<div class="mt-5">
<h4>Origine de la demande</h4>
<p>bim bam boum</p>
</div> </div>
<div class="mt-3">
<h4>Services</h4>
<ul>
<li>one</li>
<li>two</li>
</ul>
</div>
-->
</div> </div>
{% if accompanyingCourse.participations is not empty {% if accompanyingCourse.scopes is not empty
or accompanyingCourse.resources is not empty
or (accompanyingCourse.requestorThirdParty is not null or (accompanyingCourse.requestorThirdParty is not null
or accompanyingCourse.requestorPerson is not null) or accompanyingCourse.requestorPerson is not null)
or accompanyingCourse.participations is not empty
or accompanyingCourse.resources is not empty
%} %}
<div class="col-md-7 persons mb-5"> <div class="col-md-7 mb-5">
<div class="mb-3"> <div class="scopes mb-3">
{% if accompanyingCourse.scopes is not empty %}
<h4 class="item-key">{{ 'Scopes'|trans }}</h4>
<p>
{% for s in accompanyingCourse.scopes %}
<span>{{ s.name|localize_translatable_string|capitalize }}</span>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% else %}
<span class="chill-no-data-statement visually-hidden">{{ 'No scopes'|trans }}</span>
{% endif %}
</div>
<div class="requestor mb-3">
{% if accompanyingCourse.requestorPerson is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
{% elseif accompanyingCourse.requestorThirdParty is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}
{% else %}
<span class="chill-no-data-statement visually-hidden">{{ 'No requestor'|trans }}</span>
{% endif %}
</div>
<div class="persons mb-3">
{% if accompanyingCourse.participations is not empty %} {% if accompanyingCourse.participations is not empty %}
<h4 class="item-key">{{ 'Persons associated'|trans }}</h4> <h4 class="item-key">{{ 'Persons associated'|trans }}</h4>
{% for r in accompanyingCourse.participations %} {% for r in accompanyingCourse.participations %}
@ -89,18 +100,7 @@
<span class="chill-no-data-statement visually-hidden">{{ 'No participations'|trans }}</span> <span class="chill-no-data-statement visually-hidden">{{ 'No participations'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
<div class="mb-3"> <div class="resources mb-3">
{% if accompanyingCourse.requestorPerson is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
{% elseif accompanyingCourse.requestorThirdParty is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}
{% else %}
<span class="chill-no-data-statement visually-hidden">{{ 'No requestor'|trans }}</span>
{% endif %}
</div>
<div>
{% if accompanyingCourse.resources is not empty %} {% if accompanyingCourse.resources is not empty %}
<h4 class="item-key">{{ 'Resources'|trans }}</h4> <h4 class="item-key">{{ 'Resources'|trans }}</h4>
{% for r in accompanyingCourse.resources %} {% for r in accompanyingCourse.resources %}

View File

@ -23,6 +23,7 @@
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
<ul class="small_in_title"> <ul class="small_in_title">
{% if w.handlingThierParty %} {% if w.handlingThierParty %}
<li> <li>
@ -37,11 +38,13 @@
{% endfor %} {% endfor %}
</li> </li>
</ul> </ul>
<ul class="list-content my-3"> <ul class="list-content my-3">
<li class="social-issues"> <li class="social-issues">
{{ w.socialAction.issue|chill_entity_render_box }} {{ w.socialAction.issue|chill_entity_render_box }}
</li> </li>
</ul> </ul>
<ul class="small_in_title evaluations mb-3"> <ul class="small_in_title evaluations mb-3">
{% for e in w.accompanyingPeriodWorkEvaluations %} {% for e in w.accompanyingPeriodWorkEvaluations %}
<li> <li>