use chill_entity_render_box/string and design a badge-person

This commit is contained in:
2021-08-21 14:56:10 +02:00
parent b301c1d405
commit 883cb858a9
4 changed files with 40 additions and 23 deletions

View File

@@ -60,37 +60,38 @@
<div class="item-row separator">
<div class="wrap-list">
{% if accompanying_period.participations.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Participants'|trans }}</h3></div>
<div class="wl-col list">
{% for p in accompanying_period.participations %}
<p class="wl-item">
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
{{ p.person.firstname ~ ' ' ~ p.person.lastname }}
</a>
</p>
{% endfor %}
</div>
</div>
{% endif %}
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Requestor'|trans }}</h3></div>
<div class="wl-col list">
{% if accompanying_period.requestorPerson is not null %}
<p class="wl-item">
{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
</p>
<span class="wl-item">{{ accompanying_period.requestorPerson|chill_entity_render_string }}</span>
{% endif %}
{% if accompanying_period.requestorThirdParty is not null %}
<p class="wl-item">
{{ accompanying_period.requestorThirdParty.name }}
</p>
<span class="wl-item">{{ accompanying_period.requestorThirdParty|chill_entity_render_string }}</span>
{% endif %}
</div>
</div>
{% endif %}
{% if accompanying_period.participations.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Participants'|trans }}</h3></div>
<div class="wl-col list">
{% for p in accompanying_period.participations %}
<span class="wl-item badge-person">
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
{{ p.person|chill_entity_render_string }}
</a>
{# or in renderbox mode
{{ p.person|chill_entity_render_box({'render': 'label', 'addAltNames': false, 'addLink': true, 'hLevel': 5 }) }}
#}
</span>
{% endfor %}
</div>
</div>
{% endif %}
{% if accompanying_period.socialIssues.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Social issues'|trans }}</h3></div>