fix banner and person entity render block with multiple centers

This commit is contained in:
Julien Fastré 2021-11-22 10:55:38 +01:00
parent 1194aaecaf
commit 130deb26f3
2 changed files with 9 additions and 10 deletions

View File

@ -148,10 +148,13 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</li> </li>
{% if options['addCenter'] and person|chill_resolve_center is not null %} {% if options['addCenter'] and person|chill_resolve_center|length > 0 %}
{% set centers = person|chill_resolve_center %}
<li> <li>
<i class="fa fa-li fa-long-arrow-right"></i> <i class="fa fa-li fa-long-arrow-right"></i>
{{ person|chill_resolve_center.name }} {% for c in centers %}
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
{% endfor %}
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@ -17,18 +17,14 @@
{%- endif -%} {%- endif -%}
</div> </div>
<div class="text-md-end"> <div class="text-md-end">
{% if person|chill_resolve_center is not null %} {% if person|chill_resolve_center|length > 0 %}
<span class="open_sansbold"> <span class="open_sansbold">
{{ 'Center'|trans|upper}} : {{ 'Center'|trans|upper}} :
</span> </span>
{% if person|chill_resolve_center is iterable %} {% for c in person|chill_resolve_center %}
{% for c in person|chill_resolve_center %} {{ c.name|upper }}{% if not loop.last %}, {% endif %}
{{ c.name|upper }}{% if not loop.last %}, {% endif %} {% endfor %}
{% endfor %}
{% else %}
{{ person|chill_resolve_center.name|upper }}
{% endif %}
{%- endif -%} {%- endif -%}
</div> </div>