resume: improve resources bloc

This commit is contained in:
Mathieu Jaumotte 2021-11-22 17:02:08 +01:00
parent 21b33fb4f6
commit e43d22c1e0

View File

@ -34,7 +34,8 @@
{% endif %}
{% endif %}
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
{% if accompanyingCourse.locationStatus == 'address'
or accompanyingCourse.locationStatus == 'none' %}
<div class="col-md-6 warnings mb-5">
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
</div>
@ -53,18 +54,24 @@
{% endif %}
</div>
{% if accompanyingCourse.resources is not empty
and (accompanyingCourse.requestorThirdParty is not null
or accompanyingCourse.requestorPerson is not null)
%}
<div class="col-md-6 resources mb-5">
<div class="mb-3">
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{% 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">{{ 'No requestor'|trans }}</span>
<span class="chill-no-data-statement visually-hidden">{{ 'No requestor'|trans }}</span>
{% endif %}
</div>
<div>
{% if accompanyingCourse.resources is not empty %}
<h4 class="item-key">{{ 'Resources'|trans }}</h4>
{% for r in accompanyingCourse.resources %}
{% if r.person is not null %}
@ -73,11 +80,12 @@
{{ _self.insert_onthefly('thirdparty', r.thirdParty) }}
{% endif %}
{% endfor %}
{% if accompanyingCourse.resources is empty %}
<span class="chill-no-data-statement">{{ 'No resources'|trans }}</span>
{% else %}
<span class="chill-no-data-statement visually-hidden">{{ 'No resources'|trans }}</span>
{% endif %}
</div>
</div>
{% endif %}
<div class="social-actions mb-5">
<h2 class="mb-3 d-none">{{ 'Last social actions'|trans }}</h2>