Display data for Usagers concernés & Resources

This commit is contained in:
Marc Ducobu 2021-05-24 11:39:22 +02:00
parent 016baf1ac9
commit 5af36d18eb

View File

@ -5,24 +5,95 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1>{{ 'Resume Accompanying Course' | trans }}</h1>
{% if 'DRAFT' == accompanyingCourse.step %} {% if 'DRAFT' == accompanyingCourse.step %}
<div class="grid-8 centered error flash_message"> <div class="grid-8 centered error flash_message">
<span> <span>
{{ 'This accompanying course is still a draft'|trans }} {{ 'This accompanying course is still a draft'|trans }}
<a href="{{ path('chill_person_accompanying_course_show', { 'accompanying_period_id': accompanyingCourse.id } ) }}"> <a href="{{ path('chill_person_accompanying_course_show', { 'accompanying_period_id': accompanyingCourse.id } ) }}">
{{ 'Edit & activate accompanying course'|trans }} {{ 'Edit & activate accompanying course'|trans }}
</a> </a>
</span> </span>
</div> </div>
{% endif %} {% endif %}
<h1>{{ 'Associated peoples'|trans }}</h1> <div class="vue-component">
<h2>{{ 'Associated peoples'|trans }}</h2>
<h1>{{ 'Resources'|trans }}</h1> {% if accompanyingCourse.participations.count > 0 %}
<table class="rounded">
<thead>
<tr>
<th class="chill-orange">{{ 'First name' | trans }}</th>
<th class="chill-orange">{{ 'Last name' | trans }}</th>
<th class="chill-orange">{{ 'Start date' | trans }}</th>
<th class="chill-orange">{{ 'End date' | trans }}</th>
</tr>
</thead>
<tbody>
{% for participation in accompanyingCourse.participations %}
<tr>
<td>{{ participation.person.firstName }}</td>
<td>{{ participation.person.lastName }}</td>
<td>{{ participation.startDate | format_date('short') }}</td>
<td>{{ participation.endDate | format_date('short') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="grid-8 centered error flash_message">
{{ "No Associated peoples recorded" | trans }}
</div>
{% endif %}
</div>
<h1>{{ 'Social actions'|trans }}</h1> <div class="vue-component">
<h2>{{ 'Resources'|trans }}</h2>
<h1>{{ 'Last events on accompanying course'|trans }}</h1> {% if accompanyingCourse.resources.count > 0 %}
<table class="rounded">
<thead>
<tr>
<th class="chill-orange">{{ 'First name' | trans }}</th>
<th class="chill-orange">{{ 'Last name' | trans }}</th>
</tr>
</thead>
<tbody>
{% for resource in accompanyingCourse.resources %}
<tr>
<td>{{ resource.person.firstName }}</td>
<td>{{ resource.person.lastName }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="grid-8 centered alert flash_message">
{{ "No resources recorded" | trans }}
</div>
{% endif %}
</div>
<div class="vue-component">
<h2>{{ 'Social actions'|trans }}</h2>
<div class="grid-8 centered notice flash_message">
{{ "Not implemented" | trans }}
</div>
</div>
<div class="vue-component">
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
<div class="grid-8 centered notice flash_message">
{{ "Not implemented" | trans }}
</div>
</div>
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('accompanying_course') }}
{% endblock %} {% endblock %}