src/AppBundle/Resources/views/ObjectViews/partner-details.html.twig line 1

Open in your IDE?
  1. {% extends '@FoxHabbitBasis/Layout/layout.html.twig' %}
  2. {% block content %}
  3. {# Titel aus Objekt #}
  4. {% if document.getTitle() %}
  5.     {% do pimcore_head_title().set( partnerObject.getCompanyName() ~ ' | ' ~ document.getTitle()) %}
  6. {% else %}
  7.     {% do pimcore_head_title().set( partnerObject.getCompanyName()) %}
  8. {% endif %}
  9. {% set partnerDetails1Snippet = document.getProperty('partner-details-1') %}
  10. {% if partnerDetails1Snippet and not partnerDetails1Snippet.isPublished() %}
  11.     {% set partnerDetails1Snippet = null %}
  12. {% endif %}
  13. <header class="header-partner header-box-left  bg-white">
  14.     <div class="container-fluid">
  15.         <div class="row">
  16.             <div class="col-10 col-sm-9 col-md-8 col-lg-6">
  17.                 <div class="parallax-box-wrapper">
  18.                     <div class="parallax-box parallax-box-left">
  19.                         <div class="parallax-box-background">
  20.                             <div class="embed-responsive embed-responsive-1by1 bg-light"></div>
  21.                         </div>
  22.                         <div class="parallax-box-item">
  23.                             {% if partnerObject.getImage() %}
  24.                                 {{ partnerObject.getImage().getThumbnail('partner-details-logo').getHtml({imgAttributes:{class:'img-fluid'}})|raw }}
  25.                             {% endif %}
  26.                         </div>
  27.                     </div>
  28.                 </div>
  29.             </div>
  30.             <div class="col-10 col-lg-5 offset-2 offset-lg-0 py-5 d-flex flex-column flex-nowrap justify-content-center">
  31.                 <h1 class="h2">
  32.                     {{ partnerObject.getCompanyName() }}
  33.                     {#% if partnerObject.getCompanyName2() %}
  34.                         <span class="d-block">{{ partnerObject.getCompanyName2() }}</span>
  35.                     {% endif %#}
  36.                 </h1>
  37.                 <p>
  38.                     {% set partnerTypes = partnerObject.getPartnerTypeList()|split(',') %}
  39.                     {% for type in validPartnerTypes %}
  40.                         {% if type in partnerTypes %}
  41.                             <span class="h5 d-block">{{ ('dealer_search.partner_box.dealer_type.' ~ type|lower) | trans }}</span>
  42.                         {% endif %}
  43.                     {% endfor %}
  44.                 </p>
  45.                 <p>
  46.                     {% for line in partnerObject.getAddress() %}
  47.                         <span class="d-block">{{ line[0] }}</span>
  48.                     {% endfor %}
  49.                     {% if partnerObject.getStreet() %}
  50.                         <span class="d-block">{{ partnerObject.getStreet() }}</span>
  51.                     {% endif %}
  52.                     {% if partnerObject.getZip() or partnerObject.getCity() %}
  53.                         <span class="d-block">{{ partnerObject.getZip() }} {{ partnerObject.getCity() }}</span>
  54.                     {% endif %}
  55.                     {% if partnerObject.getCountry() %}
  56.                         <span>{{ locale_get_country_name( partnerObject.getCountry()) }}</span>
  57.                     {% endif %}
  58.                 </p>
  59.                 {% if partnerObject.getPhone() or partnerObject.getFax() %}
  60.                     <p>
  61.                         {% if partnerObject.getPhone() %}
  62.                             <a class="simple-link-phone d-block" href="tel:{{ partnerObject.getPhone()|replace({' ':''}) }}">{{ partnerObject.getPhone() }}</a>
  63.                         {% endif %}
  64.                         {#% if partnerObject.getFax() %}
  65.                             <a class="simple-link-fax d-block" href="fax:{{ partnerObject.getFax()|replace({' ':''}) }}">{{ partnerObject.getFax() }}</a>
  66.                         {% endif %#}
  67.                     </p>
  68.                 {% endif %}
  69.                 {#% if partnerObject.getEmail() %}
  70.                     <a class="simple-link-mail d-block" href="mailto:{{ partnerObject.getEmail() }}" target="_blank">{{ partnerObject.getEmail() }}</a>
  71.                 {% endif %#}
  72.                 {% set showExternalLink = partnerObject.getWebsite() and partnerObject.getShowWebsite() %}
  73.                 {% set showContactFormLink = partnerDetails1Snippet and partnerObject.getEvaId() %}
  74.                 {% if showExternalLink or showContactFormLink %}
  75.                     <ul class="list-unstyled linklist" >
  76.                         {% if showExternalLink %}
  77.                             <li>
  78.                                 <a class="d-block lorch-icon lorch-icon-external-link " href="{{ partnerObject.getWebsite() }}" target="_blank">{{ 'dealer_search.partner_box.website_link' | trans }}</a>
  79.                             </li>
  80.                         {% endif %}
  81.                         {% if showContactFormLink %}
  82.                             <li>      
  83.                                 <a href="#contact_form" class="lorch-icon lorch-icon-e-mail">{{ 'dealer_search.partner_box.contact_form_link' | trans }}</a>
  84.                             </li>
  85.                         {% endif %}
  86.                     </ul>
  87.                 {% endif %}
  88.             </div>
  89.         </div>
  90.     </div>
  91. </header>
  92. {% if partnerDetails1Snippet %}
  93.     {% if partnerObject.getEvaId() %}
  94.         <span id="contact_form"></span>
  95.         {{ pimcore_inc(partnerDetails1Snippet) }}
  96.     {% else %}
  97.         <!-- evalanche ID not set - no contact form available -->
  98.     {% endif %}
  99. {% endif %}
  100. {% if partnerObject.getLocation() and partnerObject.getLocation().getLatitude() and partnerObject.getLocation().getLongitude() %}
  101.     <section class="section p-0">
  102.         {{ pimcore_area('map', {type:'basisbundle-part-googlemap', params: {'basisbundle-part-googlemap': {
  103.             locationObjects: [partnerObject],
  104.             variant: 'partner_details_location'
  105.         }}}) }}
  106.     </section>
  107. {% endif %}
  108. {% if document.getProperty('partner-details-2') %}
  109.     {{ pimcore_inc(document.getProperty('partner-details-2')) }}
  110. {% endif %}
  111. {% endblock %}