{% extends '@FoxHabbitBasis/Layout/layout.html.twig' %}
{% block content %}
{# Titel aus Objekt #}
{% if document.getTitle() %}
{% do pimcore_head_title().set( partnerObject.getCompanyName() ~ ' | ' ~ document.getTitle()) %}
{% else %}
{% do pimcore_head_title().set( partnerObject.getCompanyName()) %}
{% endif %}
{% set partnerDetails1Snippet = document.getProperty('partner-details-1') %}
{% if partnerDetails1Snippet and not partnerDetails1Snippet.isPublished() %}
{% set partnerDetails1Snippet = null %}
{% endif %}
<header class="header-partner header-box-left bg-white">
<div class="container-fluid">
<div class="row">
<div class="col-10 col-sm-9 col-md-8 col-lg-6">
<div class="parallax-box-wrapper">
<div class="parallax-box parallax-box-left">
<div class="parallax-box-background">
<div class="embed-responsive embed-responsive-1by1 bg-light"></div>
</div>
<div class="parallax-box-item">
{% if partnerObject.getImage() %}
{{ partnerObject.getImage().getThumbnail('partner-details-logo').getHtml({imgAttributes:{class:'img-fluid'}})|raw }}
{% endif %}
</div>
</div>
</div>
</div>
<div class="col-10 col-lg-5 offset-2 offset-lg-0 py-5 d-flex flex-column flex-nowrap justify-content-center">
<h1 class="h2">
{{ partnerObject.getCompanyName() }}
{#% if partnerObject.getCompanyName2() %}
<span class="d-block">{{ partnerObject.getCompanyName2() }}</span>
{% endif %#}
</h1>
<p>
{% set partnerTypes = partnerObject.getPartnerTypeList()|split(',') %}
{% for type in validPartnerTypes %}
{% if type in partnerTypes %}
<span class="h5 d-block">{{ ('dealer_search.partner_box.dealer_type.' ~ type|lower) | trans }}</span>
{% endif %}
{% endfor %}
</p>
<p>
{% for line in partnerObject.getAddress() %}
<span class="d-block">{{ line[0] }}</span>
{% endfor %}
{% if partnerObject.getStreet() %}
<span class="d-block">{{ partnerObject.getStreet() }}</span>
{% endif %}
{% if partnerObject.getZip() or partnerObject.getCity() %}
<span class="d-block">{{ partnerObject.getZip() }} {{ partnerObject.getCity() }}</span>
{% endif %}
{% if partnerObject.getCountry() %}
<span>{{ locale_get_country_name( partnerObject.getCountry()) }}</span>
{% endif %}
</p>
{% if partnerObject.getPhone() or partnerObject.getFax() %}
<p>
{% if partnerObject.getPhone() %}
<a class="simple-link-phone d-block" href="tel:{{ partnerObject.getPhone()|replace({' ':''}) }}">{{ partnerObject.getPhone() }}</a>
{% endif %}
{#% if partnerObject.getFax() %}
<a class="simple-link-fax d-block" href="fax:{{ partnerObject.getFax()|replace({' ':''}) }}">{{ partnerObject.getFax() }}</a>
{% endif %#}
</p>
{% endif %}
{#% if partnerObject.getEmail() %}
<a class="simple-link-mail d-block" href="mailto:{{ partnerObject.getEmail() }}" target="_blank">{{ partnerObject.getEmail() }}</a>
{% endif %#}
{% set showExternalLink = partnerObject.getWebsite() and partnerObject.getShowWebsite() %}
{% set showContactFormLink = partnerDetails1Snippet and partnerObject.getEvaId() %}
{% if showExternalLink or showContactFormLink %}
<ul class="list-unstyled linklist" >
{% if showExternalLink %}
<li>
<a class="d-block lorch-icon lorch-icon-external-link " href="{{ partnerObject.getWebsite() }}" target="_blank">{{ 'dealer_search.partner_box.website_link' | trans }}</a>
</li>
{% endif %}
{% if showContactFormLink %}
<li>
<a href="#contact_form" class="lorch-icon lorch-icon-e-mail">{{ 'dealer_search.partner_box.contact_form_link' | trans }}</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
</div>
</header>
{% if partnerDetails1Snippet %}
{% if partnerObject.getEvaId() %}
<span id="contact_form"></span>
{{ pimcore_inc(partnerDetails1Snippet) }}
{% else %}
<!-- evalanche ID not set - no contact form available -->
{% endif %}
{% endif %}
{% if partnerObject.getLocation() and partnerObject.getLocation().getLatitude() and partnerObject.getLocation().getLongitude() %}
<section class="section p-0">
{{ pimcore_area('map', {type:'basisbundle-part-googlemap', params: {'basisbundle-part-googlemap': {
locationObjects: [partnerObject],
variant: 'partner_details_location'
}}}) }}
</section>
{% endif %}
{% if document.getProperty('partner-details-2') %}
{{ pimcore_inc(document.getProperty('partner-details-2')) }}
{% endif %}
{% endblock %}