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

Open in your IDE?
  1. <script>
  2.     _config.showDetail = true;
  3. </script>
  4. <address>
  5.     <h4 class="mb-0">{{ headlineText | raw }}</h4>
  6.     <div>
  7.         {% if address is not empty %}
  8.             {% set addressInfos = address.getAddressLine1() %}
  9.             {%  if address.getAddressLine2() is not empty %}
  10.                 {% set addressInfos =  addressInfos ~ " " ~ address.getAddressLine2() %}
  11.             {% endif %}
  12.             {% set addressInfos = addressInfos ~ ", <br>" ~ address.getZipcode() ~ " " ~ address.getTown() ~ " " ~ address.getCity() ~ " " ~ address.getCountry() %}
  13.             {{ addressInfos|raw }}
  14.         {% endif %}
  15.     </div>
  16.     <div class="mt-5 mb-3">
  17.         {% if address is not empty %}
  18.         {% if address.getPhone() is not empty %}
  19.             <div class="js-show-detail" aria-expanded="false">
  20.                 <span class="demi-icon demi-icon-tel icon-in-text-width"></span>
  21.                         <span class="js-show-detail__hide"
  22.                               id="accommodation-phone-nr">{{ address.getPhone()|slice(0,-6) }}
  23.                             ...</span>
  24.                 <a class="text-primary js-show-detail__show"
  25.                    href="tel:{{ address.getPhone()|replace({' ': ''}) }}"
  26.                    hidden>{{ address.getPhone() }}</a>
  27.                 <button class="js-show-detail__show-btn btn-no-styling btn-link text-primary js-tracking js-tracking--click"
  28.                         type="button"
  29.                         data-tracking-category="button"
  30.                         data-tracking-action="anrufen"
  31.                         data-tracking-label="{{ accommodation.getName()|escape }}"
  32.                         data-counting-click-type="SPPhone"
  33.                 >{{ 'demi.detail.show'|trans }}</button>
  34.             </div>
  35.         {% endif %}
  36.         {% if address.getMobile() is not empty %}
  37.             <div class="js-show-detail" aria-expanded="false">
  38.                 <span class="demi-icon demi-icon-mobile-phone-2 icon-in-text-width"></span>
  39.                 <span class="js-show-detail__hide"
  40.                       id="accommodation-phone-nr">{{ address.getMobile()|slice(0,-6) }}
  41.                         ...</span>
  42.                 <a class="text-primary js-show-detail__show"
  43.                    href="tel:{{ address.getMobile()|replace({' ': ''}) }}"
  44.                    hidden>{{ address.getMobile() }}</a>
  45.                 <button class="js-show-detail__show-btn btn-no-styling btn-link text-primary js-tracking js-tracking--click"
  46.                         type="button"
  47.                         data-tracking-category="button"
  48.                         data-tracking-action="anrufen"
  49.                         data-tracking-label="{{ accommodation.getName()|escape }}"
  50.                         data-counting-click-type="SPPhone"
  51.                 >{{ 'demi.detail.show'|trans }}</button>
  52.             </div>
  53.         {% endif %}
  54.         {% if address.getEmail() is not empty %}
  55.             <div class="js-show-detail" aria-expanded="false">
  56.                 <span class="demi-icon demi-icon-email icon-in-text-width"></span>
  57.                         <span class="js-show-detail__hide"
  58.                               id="accommodation-mail">{{ address.getEmail()|slice(0,-6) }}
  59.                             ...</span>
  60.                 <a class="text-primary js-show-detail__show" hidden
  61.                    href="mailto:{{ address.getEmail() }}"
  62.                    data-ga-event="unterkunft_email">{{ address.getEmail() }}</a>
  63.                 <button class="js-show-detail__show-btn btn-no-styling btn-link text-primary js-tracking js-tracking--click"
  64.                         type="button"
  65.                         data-tracking-category="button"
  66.                         data-tracking-action="e-mail"
  67.                         data-tracking-label="{{ accommodation.getName()|escape }}">{{ 'demi.detail.show'|trans }}</button>
  68.             </div>
  69.         {% endif %}
  70.         {% if address.getUrl() is not empty %}
  71.             {% set url = demi_findNiceUrl(address.getUrl()) %}
  72.             {% if url is not empty %}
  73.                     <div>
  74.                         <span class="demi-icon demi-icon-link icon-in-text-width"></span>
  75.                         <a href="{{ url }}"
  76.                            target="_blank"
  77.                            class="text-primary js-tracking js-tracking--click"
  78.                            data-tracking-category="button"
  79.                            data-tracking-action="website"
  80.                            data-tracking-label="{{ trackingLabel|escape }}"
  81.                            data-counting-click-type="SPURL"
  82.                         >{{ address.getUrl() }}</a>
  83.                     </div>
  84.             {% endif %}
  85.         {% endif %}
  86.     {% endif %}
  87. </address>
  88. {% if accommodation.getLicenseNumber() is not empty  %}
  89.     <div class="mb-3">
  90.         {{ "demi.detail.license-number" | trans }}: {{ accommodation.getlicenseNumber() }}
  91.     </div>
  92. {% endif %}