Files
chill-bundles/src/Bundle/ChillPersonBundle/Resources/views/Person/banner.html.twig

77 lines
3.7 KiB
Twig

<div class="banner banner-person">
<div id="header-person-name" class="header-name">
<div class="container-xxl">
<div class="row">
<div class="col-md-6 ps-md-5 ps-xxl-0">
{{ person|chill_entity_render_box({
'render': 'label', 'addInfo': true, 'addAge': true, 'addId': true, 'hLevel': 1
}) }}
</div>
<div class="col-md-6">
{{ include('@ChillPerson/Person/banner_custom.html.twig') }}
</div>
</div>
</div>
</div>
<div id="header-person-details" class="header-details">
<div class="container-xxl">
<div class="row justify-content-between">
<div class="col-md-12 ps-md-5 ps-xxl-0 container">
<div class="row contact">
{% if person.phonenumber %}
<span class="col-auto phonenumber">
<i class="fa fa-fw fa-phone"></i>
<a href="{{ 'tel:' ~ person.phonenumber|phone_number_format('E164') }}" class="phone mr-3" title="{{ 'Phonenumber'|trans }}">
{{ person.phonenumber|chill_format_phonenumber }}</a>
</span>
{% endif %}
{% if person.mobilenumber %}
<span class="col-auto mobilenumber">
<i class="fa fa-fw fa-mobile"></i>
<a href="{{ 'tel:' ~ person.mobilenumber|phone_number_format('E164') }}" class="phone mr-3" title="{{ 'Mobilenumber'|trans }}">
{{ person.mobilenumber|chill_format_phonenumber }}</a>
</span>
{% endif %}
{% if person.email %}
<span class="col-auto email">
<i class="fa fa-fw fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
{{ person.email }}
</a>
</span>
{% endif %}
{% set address = null %}
{%- if person.currentHouseholdAddress is not empty -%}
{% set address = person.currentHouseholdAddress %}
{%- elseif person.lastAddress is not empty -%}
{% set address = person.lastAddress %}
{%- endif -%}
<span class="col-md-auto address">
{%- if address is not null -%}
{{ address|chill_entity_render_box({
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true,
'details_button': true
}) }}
{%- endif -%}
{% if person.getCurrentHousehold is not null %}
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id' : person.getCurrentHousehold.id } ) }}"
class="btn btn-sm household-link" title="{{ 'Show household'|trans }}">
<i class="fa fa-lg fa-home"></i>
</a>
{% endif %}
</span>
</div>
</div>
</div>
</div>
</div>
<a id="banner-person"></a>
</div>