76 lines
3.3 KiB
Twig

<div class="banner banner-household">
<div id="header-household-name" class="header-name">
<div class="container-xxl">
<div class="row">
<div class="col-md-4 col-lg-3 ps-md-5 ps-xxl-0">
<h1>
<i class="fa fa-home"></i>
{{ 'household.Household'|trans }}
<span class="id-number">{{ household.id }}</span>
</h1>
</div>
<div class="col-md-8 col-lg-9">
<div class="household-members my-3 pe-md-5 pe-xxl-0 justify-content-md-end">
{%- set members = household.getCurrentMembersOrdered() -%}
{%- if members|length > 0 -%}
<span class="current-members-explain" style="display: none;">
{{- 'household.Current household members'|trans }}
<i class="fa fa-fw fa-users" title="{{- 'household.Current household members'|trans }}"></i>
</span>
{%- for m in members|slice(0, 5) -%}
<span
class="badge-member{%- if m.holder %} holder{% endif -%}{%- if m.position.ordering >= 2 %} child{% endif -%}"
title="{{ m.position.label.fr }}">
{%- if m.holder %}
<span class="badge bg-chill-light-gray text-chill-gray">
{{ 'household.holder'|trans }}
</span>
{% endif -%}
{{- m.person|chill_entity_render_box({'addLink': false}) -}}
</span>
{%- endfor -%}
{% if members|length > 5 %}
<span class="current-members-more">
{{ 'household.and x other persons'|trans({'x': members|length-5}) }}
</span>
{% endif %}
{%- endif -%}
</div>
</div>
</div>
</div>
</div>
<div id="header-household-details" class="header-details">
<div class="container-xxl">
<div class="row justify-content-md-right">
<div class="contact col-md-12 ps-md-5 ps-xxl-0">
{% set address = household.currentAddress %}
{% if address is empty %}
<span class="chill-no-data-statement">
{{ 'household.Household does not have any address currently'|trans }}
</span>
{% else %}
<span class=" d-block d-sm-inline-block">
{{ address|chill_entity_render_box({
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
}) }}
</span>
{% endif %}
</div>
</div>
</div>
</div>
<a id="banner-household"></a>
</div>