accompanying period: add items in the summary page

This commit is contained in:
nobohan 2021-06-29 17:37:58 +02:00
parent 6e277e99ae
commit 34af401a98
2 changed files with 46 additions and 16 deletions

View File

@ -8,7 +8,6 @@
<h1>{{ 'Accompanying period list'|trans }}</h1> <h1>{{ 'Accompanying period list'|trans }}</h1>
{% for accompanying_period in accompanying_periods %} {% for accompanying_period in accompanying_periods %}
<div class="flex-table"> <div class="flex-table">
<div class="item-bloc"> <div class="item-bloc">
@ -16,8 +15,25 @@
<div class="item-col"> <div class="item-col">
{{'period'|trans}} <b>#{{ accompanying_period.id }}</b> {{'period'|trans}} <b>#{{ accompanying_period.id }}</b>
{% if accompanying_period.emergency %} {% if accompanying_period.emergency %}
<span class="badge badge-secondary"> &nbsp;
{{- 'Emergency'|trans -}} <span class="badge badge-primary">
{{- 'Emergency'|trans|upper -}}
</span>
{% endif %}
{% if accompanying_period.confidential %}
&nbsp;
<span class="badge badge-primary">
{{- 'Confidential'|trans|upper -}}
</span>
{% endif %}
{% if accompanying_period.step == 'DRAFT' %}
&nbsp;
<span class="badge badge-primary">
{{- 'Draft'|trans|upper -}}
</span>
{% else %}
<span class="badge badge-primary">
{{- 'Confirmed'|trans|upper -}}
</span> </span>
{% endif %} {% endif %}
</div> </div>
@ -51,8 +67,8 @@
{% endif %} {% endif %}
</div> </div>
<div class="item-row">
<div class="item-col">
<h3>{{ 'Participants'|trans }}</h3> <h3>{{ 'Participants'|trans }}</h3>
{% if accompanying_period.participations.count > 0 %} {% if accompanying_period.participations.count > 0 %}
{% for p in accompanying_period.participations %} {% for p in accompanying_period.participations %}
@ -65,20 +81,31 @@
{% else %} {% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span> <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
<div class="item-col"> <div class="item-col">
<h3>{{ 'Requestor'|trans }}</h3> <h3>{{ 'Requestor'|trans }}</h3>
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
{% if accompanying_period.requestorPerson is not null %} {% if accompanying_period.requestorPerson is not null %}
<p>{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}</p> <p>{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}</p>
{% endif %}
{% if accompanying_period.requestorThirdParty is not null %}
<p>{{ accompanying_period.requestorThirdParty.name }}</p>
{% endif %}
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
{% if accompanying_period.requestorThirdParty is not null %} </div>
<p>{{ accompanying_period.requestorThirdParty.name }}</p>
<div class="item-col">
<h3>{{ 'Social issues'|trans }}</h3>
{% if accompanying_period.socialIssues.count > 0 %}
{% for si in accompanying_period.socialIssues %}
<p>{{ si.title|localize_translatable_string }}</p>
{% endfor %}
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
{% else %} </div>
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</div>
<div class="item-row"> <div class="item-row">
<ul class="record_actions"> <ul class="record_actions">

View File

@ -324,6 +324,9 @@ accompanying_period:
dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date% dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date%
occasional: ponctuel occasional: ponctuel
regular: régulier regular: régulier
Confidential: confidentiel
Draft: brouillon
Confirmed: en file active
# Accompanying Course # Accompanying Course
Accompanying Course: Parcours d'accompagnement Accompanying Course: Parcours d'accompagnement