custom/plugins/NetiNextStoreLocator/src/Resources/views/storefront/store_locator/list/store.twig line 1

Open in your IDE?
  1. {% block neti_store_locator_store %}
  2.     <div
  3.             class="container store border-bottom py-3"
  4.             :class="{ featured: store.featured, selected: isStoreSelected }"
  5.             data-neti-next-store-locator-item-options='{{ store|json_encode|escape }}'
  6.             @click="onClick"
  7.     >
  8.         <div class="selected-store--icon" v-if="isStoreSelected">
  9.             {% sw_icon 'bookmark' %}
  10.         </div>
  11.         {% block neti_store_locator_store_close_button %}
  12.             <div class="row" v-if="horizontal && selected">
  13.                 <div class="col close-panel">
  14.                     <span @click="onClose">
  15.                         {% sw_icon 'x' %}
  16.                     </span>
  17.                 </div>
  18.             </div>
  19.         {% endblock %}
  20.         {% block neti_store_locator_store_title %}
  21.             <div class="row">
  22.                 <div class="col title" @click.prevent="onMarkerClicked">
  23.                     <h4>{{ '{{ store.label }}' }}</h4>
  24.                 </div>
  25.                 <div v-if="isStoreOpen" class="col-auto text-success">
  26.                     {{ "neti-next-store-locator.index.store.open"|trans }}
  27.                 </div>
  28.             </div>
  29.         {% endblock %}
  30.         <div class="d-flex">
  31.             {% block neti_store_locator_store_address %}
  32.                 <div class="address flex-fill">
  33.                     <template v-if="store.country.iso == 'GB'">
  34.                         {{ '{{ store.streetNumber }} {{ store.street }}' }}<br />
  35.                         {{ '{{ store.city }}' }}<br />
  36.                         <template v-if="store.countryState">
  37.                             {{ '{{ store.countryState.translated.name }}' }}<br />
  38.                         </template>
  39.                         {{ '{{ store.zipCode }}' }}<br />
  40.                         <template v-if="store.country">
  41.                             {{ '{{ store.country.name }}' }}<br />
  42.                         </template>
  43.                     </template>
  44.                     <template v-else >
  45.                         {{ '{{ store.street }} {{ store.streetNumber }}' }}<br />
  46.                         {{ '{{ store.zipCode }} {{ store.city }}' }}<br />
  47.                         <template v-if="store.country">
  48.                             {{ '{{ store.country.name }}' }}<br />
  49.                         </template>
  50.                     </template>
  51.                 </div>
  52.             {% endblock %}
  53.             {% block neti_store_locator_store_actions %}
  54.                 <div class="actions ml-2 d-flex flex-column">
  55.                     <span class="flex-fill"></span>
  56.                     <div class="distance mb-1" v-if="store.distance !== null">
  57.                         <span class="badge badge-info value">
  58.                             {{ '{{ Math.round(store.distance * 100) / 100 }} {{ $parent.config.distanceUnit }}' }}
  59.                         </span>
  60.                     </div>
  61.                     <a class="marker btn btn-light btn-sm align-self-end" @click.prevent="onMarkerClicked">
  62.                         {% sw_icon 'marker' %}
  63.                     </a>
  64.                 </div>
  65.             {% endblock %}
  66.         </div>
  67.         {% block neti_store_locator_store_meta %}
  68.             <div class="additional-info mt-2" v-slide="selected">
  69.                 {% block neti_store_locator_store_media %}
  70.                     <div class="store--image" v-if="store.pictureMedia">
  71.                         <img
  72.                                 :src="store.pictureMedia.url" :alt="store.label"
  73.                                 style="max-width: 100%; max-height: 100px;"
  74.                         >
  75.                     </div>
  76.                 {% endblock %}
  77.                 {% block neti_store_locator_store_phone %}
  78.                     <template v-if="store.phone">
  79.                         <strong>{{ "neti-next-store-locator.index.store.labelTelephone"|trans }}</strong>
  80.                         <a :href="'tel:' + store.phone">
  81.                             {{ '{{ store.phone }}' }}
  82.                         </a>
  83.                         <br />
  84.                     </template>
  85.                 {% endblock %}
  86.                 {% block neti_store_locator_store_fax %}
  87.                     <template v-if="store.fax">
  88.                         <strong>{{ "neti-next-store-locator.index.store.labelFax"|trans }}</strong>
  89.                         {{ '{{ store.fax }}' }}
  90.                         <br />
  91.                     </template>
  92.                 {% endblock %}
  93.                 {% block neti_store_locator_store_email %}
  94.                     <template v-if="store.email">
  95.                         <strong>{{ "neti-next-store-locator.index.store.labelEmail"|trans }}</strong>
  96.                         <a :href="'mailto:' + store.email">{{ '{{ store.email }}' }}</a>
  97.                         <br />
  98.                     </template>
  99.                 {% endblock %}
  100.                 {% block neti_store_locator_store_url %}
  101.                     <template v-if="store.url">
  102.                         <a :href="store.url" target="_blank">
  103.                             {{ '{{ store.url }}' }}
  104.                         </a>
  105.                         <br />
  106.                     </template>
  107.                 {% endblock %}
  108.                 {% block neti_store_locator_store_additional_info %}
  109.                     <template v-if="additionalInformation">
  110.                         <br />
  111.                         <div v-html="additionalInformation"></div>
  112.                         <br />
  113.                     </template>
  114.                 {% endblock %}
  115.                 {% block neti_store_locator_store_opening_times %}
  116.                     <template v-if="config.showOpeningTimesOnListing">
  117.                         <template v-if="hasBusinessHours">
  118.                             <br />
  119.                             <div v-if="isDifferentTimeZone">
  120.                                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  121.                                     type: "info",
  122.                                     content: "neti-next-store-locator.index.store.differentTimeZone"|trans({
  123.                                         "%storeTimezone%": '{{ store.timezone }}',
  124.                                         "%userTimezone%": app.request.cookies.get('timezone')
  125.                                     })|sw_sanitize
  126.                                 } %}
  127.                             </div>
  128.                             <div class="buiness-hours-week">
  129.                                 <dl v-for="weekDay in weekDays" class="row mb-1 justify-content-end">
  130.                                     <template v-if="businessHours[weekDay.id]">
  131.                                         <dt class="col-4">{{ '{{ weekDay.translated.name }}' }}:</dt>
  132.                                         <dd v-for="businessHour in businessHours[weekDay.id]" class="col-8 mb-0">
  133.                                             {{ '{{ formatTime(businessHour.businessHour.start) }}' }} - {{ '{{ formatTime(businessHour.businessHour.end) }}' }}
  134.                                         </dd>
  135.                                     </template>
  136.                                 </dl>
  137.                             </div>
  138.                         </template>
  139.                         <template v-else-if="formattedOpeningTimes">
  140.                             <br />
  141.                             <div class="opening-times">
  142.                                 <strong>
  143.                                     {{ "neti-next-store-locator.index.store.labelOpeningTimes"|trans }}
  144.                                 </strong>
  145.                                 <div v-html="formattedOpeningTimes"></div>
  146.                             </div>
  147.                         </template>
  148.                     </template>
  149.                 {% endblock %}
  150.                 {% block neti_store_locator_store_buttons %}
  151.                     <div class="button-group d-flex flex-row flex-wrap mt-2">
  152.                         {% block neti_store_locator_store_button_contact %}
  153.                             <button
  154.                                     class="btn btn-secondary" v-if="store.contactFormEnabled"
  155.                                     @click.prevent="onContact"
  156.                             >
  157.                                 {{ "neti-next-store-locator.index.store.buttonContact"|trans }}
  158.                             </button>
  159.                         {% endblock %}
  160.                         {% block neti_store_locator_store_button_detail %}
  161.                             <a
  162.                                     class="btn btn-primary flex-fill"
  163.                                     :href="detailLink" v-if="store.detailPageEnabled"
  164.                             >
  165.                                 {{ "neti-next-store-locator.index.store.buttonDetails"|trans }}
  166.                             </a>
  167.                         {% endblock %}
  168.                         {% block neti_store_locator_store_button_route %}
  169.                             <template v-if="store.distance > 0">
  170.                                 <a
  171.                                         v-if="routeLink"
  172.                                         class="btn btn-secondary" :href="routeLink" target="_blank"
  173.                                 >
  174.                                     {{ "neti-next-store-locator.index.store.buttonRoute"|trans }}
  175.                                 </a>
  176.                                 <button
  177.                                         v-else
  178.                                         class="btn btn-secondary"
  179.                                         @click.prevent="onRoute"
  180.                                 >
  181.                                     {{ "neti-next-store-locator.index.store.buttonRoute"|trans }}
  182.                                 </button>
  183.                             </template>
  184.                         {% endblock %}
  185.                         {% block neti_store_locator_store_button_select %}
  186.                             <button class="btn btn-primary flex-fill" v-if="config._storePickupEnabled" @click="onSelectStore" :disabled="isStoreSelected">
  187.                                 <template v-if="isStoreSelected">
  188.                                     {{ "neti-next-store-locator.index.store.buttonSelected"|trans }}
  189.                                 </template>
  190.                                 <template v-else>
  191.                                     {{ "neti-next-store-locator.index.store.buttonSelect"|trans }}
  192.                                 </template>
  193.                             </button>
  194.                         {% endblock %}
  195.                     </div>
  196.                 {% endblock %}
  197.             </div>
  198.         {% endblock %}
  199.     </div>
  200. {% endblock %}