src/Elements/Bundle/DemiFrontendBundle/Resources/views/Accommodation/includes/detail-templates/contactaddress.mobile.html.twig line 1

Open in your IDE?
  1. {%  if address is defined and address is not empty %}
  2.     {% set addressForMap = accommodation.getName() ~ " " ~ address.getAddressLine1() ~ ', ' ~ address.getZipcode() ~ " " ~ address.getTown() ~ " " ~ address.getCity() ~ " " ~ address.getCountry() ~ " " %}
  3.     {%  if not demi_core_configuration("getUseStaticImageForMap",[]) or (demi_core_configuration("getUseStaticImageForMap",[]) and demi_getStaticImageMap(acco) is null) %}
  4.         <div class="embed-responsive embed-responsive-detail-map bg-light-gray mb-3">
  5.             <iframe frameborder="0" style="border:0"
  6.                     src="https://www.google.com/maps/embed/v1/place?q={{ accommodation.getProperty('google_place_id') ? "place_id:" ~ accommodation.getProperty('google_place_id') : addressForMap|url_encode }}&key={{ googleMapsKey }}"
  7.                     allowfullscreen></iframe>
  8.         </div>
  9.     {% endif %}
  10. {% endif %}
  11. <h4>{{ headlineText | raw }}</h4>
  12. <div>
  13.     {% if address is not empty %}
  14.         {% set addressInfos = address.getAddressLine1() %}
  15.         {%  if address.getAddressLine2() is not empty %}
  16.             {% set addressInfos =  addressInfos ~ " " ~ address.getAddressLine2() %}
  17.         {% endif %}
  18.         {% set addressInfos = addressInfos ~ ", <br>" ~ address.getZipcode() ~ " " ~ address.getTown() ~ " " ~ address.getCity() ~ " " ~ address.getCountry() %}
  19.         {{ addressInfos|raw }}
  20.     {% endif %}
  21.     
  22. </div>
  23. <script data-cookieconsent="ignore">
  24.     _config.address = "{{ address.getAddressLine1() ~ address.getZipcode() ~ " " ~ address.getTown() ~ " " ~ address.getCity() ~ " " ~ address.getCountry() }}";
  25. </script>
  26. <ul class="list-unstyled">
  27.    {% if googleMapLink is not empty %}
  28.         <li class="mt-2">
  29.             <a href="{{ googleMapLink }}"
  30.                target="_blank"
  31.                class="text-primary js-tracking js-tracking--click"
  32.                data-tracking-category="button"
  33.                data-tracking-action="google maps"
  34.                data-tracking-label="{{ trackingLabel|escape }}">
  35.                 <span class="icon-in-text demi-icon demi-icon-navigation" aria-hidden="true"></span>
  36.                 <span class="text-underline">{{ 'demi.detail.show-on-map'|trans }}</span>
  37.             </a>
  38.         </li>
  39.    {% endif %}
  40.    {% if address.getUrl() is not empty %}
  41.         {% set url = demi_findNiceUrl(address.getUrl()|escape) %}
  42.         {% if url is not empty %}
  43.             <li class="mt-2">
  44.                 <a href="{{ url }}" target="_blank" class="text-primary js-tracking js-tracking--click"
  45.                    data-tracking-category="button"
  46.                    data-tracking-action="website"
  47.                    data-tracking-label="{{ trackingLabel|escape }}"
  48.                    data-counting-click-type="SPURL">
  49.                     <span class="icon-in-text demi-icon demi-icon-link" aria-hidden="true"></span>
  50.                     <span class="text-underline">{{ 'demi.detail.website'|trans }}</span>
  51.                 </a>
  52.             </li>
  53.         {% endif %}
  54.    {% endif %}
  55. </ul>
  56. {% if accommodation.getLicenseNumber() is not empty %}
  57.     <div class="mb-3 mt-2">
  58.         {{ "demi.detail.license-number"|trans }}: {{ accommodation.getLicenseNumber() }}
  59.     </div>
  60. {% endif %}
  61. <hr>
  62. <address>
  63.     {%  if address.getPhone() is not empty  %}
  64.         <a class="btn btn-success mr-2 js-tracking js-tracking--click"
  65.            href="tel:{{ address.getPhone()|replace({' ':''}) }}"
  66.            data-tracking-category="button"
  67.            data-tracking-action="anrufen"
  68.            data-tracking-label="{{ trackingLabel }}"
  69.            data-counting-click-type="SPPhone">
  70.             <span class="demi-icon demi-icon-tel mr-2" aria-hidden="true"></span>
  71.             {{ "demi.detail.call"|trans }}
  72.         </a>
  73.     {%  elseif address.getMobile() is not empty %}
  74.         <a class="btn btn-success mr-2 js-tracking js-tracking--click"
  75.            href="tel:{{ address.getMobile()|replace({' ':''}) }}"
  76.            data-tracking-category="button"
  77.            data-tracking-action="anrufen"
  78.            data-tracking-label="{{ trackingLabel }}"
  79.            data-counting-click-type="SPPhone">
  80.             <span class="demi-icon demi-icon-tel mr-2" aria-hidden="true"></span>
  81.             {{ "demi.detail.call"|trans }}
  82.         </a>
  83.     {% endif %}
  84.     {% if address.getEmail() is not empty %}
  85.         <a class="btn btn-primary js-tracking js-tracking--click"
  86.            href="mailto:{{ address.getEmail() }}"
  87.            data-tracking-category="button"
  88.            data-tracking-action="e-mail"
  89.            data-tracking-label="{{ trackingLabel }}">
  90.             <span class="demi-icon demi-icon-email mr-2" aria-hidden="true"></span>
  91.             {{ 'demi.detail.send-mail'|trans }}
  92.         </a>
  93.    {% endif %}
  94. </address>
  95. <hr>