In AccompanyingPeriod list, only show existing informations

That rule must be the same for each list,
we show empty datas messages in the complete show view
This commit is contained in:
Mathieu Jaumotte 2021-08-20 00:46:28 +02:00
parent e711ac1feb
commit d100de4fcd

View File

@ -72,47 +72,45 @@
</div> </div>
</div> </div>
</div> </div>
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
<div class="item-row"> <div class="item-row">
<div class="wraplist"> <div class="wraplist">
<div class="wl-row"> <div class="wl-row">
<div class="wl-col title"><h3>{{ 'Requestor'|trans }}</h3></div> <div class="wl-col title"><h3>{{ 'Requestor'|trans }}</h3></div>
<div class="wl-col list"> <div class="wl-col list">
{% 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 class="wl-item">
<p class="wl-item"> {{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }} </p>
</p> {% endif %}
{% endif %} {% if accompanying_period.requestorThirdParty is not null %}
{% if accompanying_period.requestorThirdParty is not null %} <p class="wl-item">
<p class="wl-item"> {{ accompanying_period.requestorThirdParty.name }}
{{ accompanying_period.requestorThirdParty.name }} </p>
</p>
{% endif %}
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="item-row"> {% endif %}
<div class="wraplist">
<div class="wl-row"> {% if accompanying_period.socialIssues.count > 0 %}
<div class="wl-col title"><h3>{{ 'Social issues'|trans }}</h3></div> <div class="item-row">
<div class="wl-col list"> <div class="wraplist">
{% if accompanying_period.socialIssues.count > 0 %} <div class="wl-row">
<div class="wl-col title"><h3>{{ 'Social issues'|trans }}</h3></div>
<div class="wl-col list">
{% for si in accompanying_period.socialIssues %} {% for si in accompanying_period.socialIssues %}
<p class="wl-item"> <p class="wl-item">
{{ si.title|localize_translatable_string }} {{ si.title|localize_translatable_string }}
</p> </p>
{% endfor %} {% endfor %}
{% else %} </div>
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> {% endif %}
<div class="item-row separator"> <div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">