templates/front_v4/mca/store/_store_card.html.twig line 1

Open in your IDE?
  1. <!-- Card -->
  2. <div id="store-{{ store.id }}"
  3.      class="card card-bordered card-transition mb-3 {% if preferred is defined and preferred == true %}border-primary{% endif %}"
  4.      data-id="{{ store.id }}"
  5.      data-lat="{% if store.geocoding_data is defined %}{{ store.geocoding_data.latitude }}{% endif %}"
  6.      data-lng="{% if store.geocoding_data_longitude is defined %}{{ store.geocoding_data.longitude }}{% endif %}"
  7.      data-name="{{ store.name }}"
  8.      data-address="{{ store.address }}" data-zipcode="{{ store.zipcode }}" data-city="{{ store.city }}"
  9.      data-phone="{% if store.geocoding_data_longitude is defined %}{{ store.phone_number }}{% endif %}">
  10.     <div class="card-body p-4">
  11.         <!-- Media -->
  12.         <div class="d-sm-flex">
  13.             <div class="flex-grow-1 ms-sm-3">
  14.                 <div class="row">
  15.                     <div class="col-6 col-md-2 order-sm-0 order-0 my-auto">
  16.                         <div class="flex-shrink-0 d-flex justify-content-lg-center">
  17.                             {% if store.isIndexable and store.slug is defined %}
  18.                             {# show store page only if store had indexation #}
  19.                             <a class="text-dark" href="{{ path('show_store_page', {'slug': store.slug}) }}">
  20.                             {% endif %}
  21.                             <img class="store-card-logo {% if isOrlWebsite() %}max-width-5{% endif %}" src="
  22.                         {% if store.hasLogo is defined and store.hasLogo %}
  23.                             {% if store.object is defined and store.object is not null %}{% set storeObject = store.object %}{% else %}{% set storeObject = store %}{% endif %}
  24.                                {{ vich_uploader_asset(storeObject, 'logoFile') | imagine_filter('brand_logo_medium') }}
  25.                             {% elseif store.hearingBrand is defined and store.hearingBrand %}
  26.                            {{ vich_uploader_asset(store.hearingBrand, 'logoFile') | imagine_filter('brand_logo_medium') }}
  27.                             {% else %}
  28.                                 {% if isOrlWebsite() %}
  29.                                 {{ asset('build/orl/images/short_logo_orl.svg') }}
  30.                                 {% else %}
  31.                                 {{ asset('build/front_v4/logo_mca/mca_transparent_short_logo.png') | imagine_filter('brand_logo_small') }}
  32.                                 {% endif %}
  33.                             {% endif %}" alt="{{ store.name }} - Mon Centre Auditif">
  34.                             {% if store.isIndexable and store.slug is defined %}
  35.                             </a>
  36.                             {% endif %}
  37.                         </div>
  38.                     </div>
  39.                     <div class="col-12 col-md-4 text-start order-sm-2 order-md-1 order-2">
  40.                         {% if store.isIndexable and store.slug is defined %}
  41.                         {# show store page only if store had indexation #}
  42.                         <a class="text-dark" href="{{ path('show_store_page', {'slug': store.slug}) }}">
  43.                         {% endif %}
  44.                         <h6 class="card-title">
  45.                             <p class="h5 text-gray fw-bold mt-md-1 mt-3"
  46.                                title="{{ store.name }}">{{ store.name|length > 16 ? store.name|slice(0, 14) ~ '...'|upper : store.name|upper }}</p>
  47.                             <p class="d-block d-inline my-md-0 mb-3">
  48.                                 <span>{{ store.address }}</span><br>
  49.                                 <span>{{ store.city }} </span>
  50.                             </p>
  51.                             {#                            <img class="avatar avatar-xss ms-1" src="@@autopath/assets/svg/illustrations/top-vendor.svg" alt="Review rating" data-toggle="tooltip" data-placement="top" title="Claimed profile"> #}
  52.                         </h6>
  53.                         {% if store.isIndexable and store.slug is defined %}
  54.                         </a>
  55.                         {% endif %}
  56.                     </div>
  57.                     <div class="col-6 col-md-2 text-md-center text-end order-sm-1 order-md-2 order-1 align-self-center">
  58.                         {% if linkToStore is not defined or linkToStore != true %}
  59.                             {% if store.distance is defined %}
  60.                                 <span class="btn btn-xs border-primary btn-soft-primary"
  61.                                       style="padding: 0.4375rem 0.5375rem;">{{ store.distance }} km</span>
  62.                             {% endif %}
  63.                             {% if store.handicapAccess is defined and store.handicapAccess == true %}
  64.                                 <i class="bi bi-person-wheelchair px-1" data-bs-toggle="tooltip"
  65.                                    data-bs-placement="bottom"
  66.                                    title="Accessible aux personnes à mobilité réduite"></i>
  67.                             {% endif %}
  68.                             {# link to estimation page visible only for admin role #}
  69.                             {% if app.user and app.user.isAdmin %}
  70.                                 <a target="_blank"
  71.                                    href="{{ path('backoffice_store_reach', {'estimated_reach[store]': store.id}) }}"
  72.                                    class="btn btn-xs btn-secondary">Estimation</a>
  73.                             {% endif %}
  74.                         {% endif %}
  75.                     </div>
  76.                     <!-- End Col -->
  77.                     <div class="col-12 col-md-4 order-md-3 order-sm-4 order-4 mb-1 text-center align-self-center">
  78.                         {% if linkToStore is defined and linkToStore == true %}
  79.                             <a href="{{ path('show_store_page', {'slug': store.slug}) }}">
  80.                             <span class="col-sm-6 text-primary text-sm-right">
  81.                                             Découvrir le centre
  82.                                                 <span class="bi bi-arrow-right small ms-2"></span>
  83.                                               </span>
  84.                             </a>
  85.                         {% else %}
  86.                             {% if isOrlWebsite() %}
  87.                                 <button class="btn btn-finder btn-sm btn-block border-primary btn-soft-primary btn-transition w-100 cursor-pointer my-1"
  88.                                         data-bs-toggle="modal"
  89.                                         data-bs-target="#rdvOrlModal"
  90.                                         data-id="{{ orlOffice.id }}">
  91.                                     Demander un RDV
  92.                                 </button>
  93.                             {% endif %}
  94.                             {% if store.isPartner is defined and store.isPartner %}
  95.                                 <button class="btn btn-sm btn-block btn-warning w-100"
  96.                                         href="#" data-bilan-gtm="" data-bs-toggle="modal"
  97.                                         data-bs-target="#prospectModal" data-id="{{ store.id }}"
  98.                                         data-request="checkup" onclick="dataLayer.push({
  99.                                         'event': 'click-checkup',
  100.                                         'centreMarque': '{{ store.name }}',
  101.                                         'centreID': '{{ store.id }}'
  102.                                         });">
  103.                                     Je prends RDV
  104.                                 </button>
  105.                             {% else %}
  106.                                 {% if store.phoneNumber is defined or store.isFreeNumber is defined and store.isIndexable %}
  107.                                     <button class="btn btn-sm btn-block btn-outline-secondary w-100 reach-phone cursor-pointer"
  108.                                             data-id="{{ store.id }}" data-request="phone"
  109.                                             onclick="dataLayer.push({
  110.                                                     'event': 'click-phone',
  111.                                                     'centreMarque': '{{ store.name }}',
  112.                                                     'centreID': '{{ store.id }}'
  113.                                                     });">
  114.                                         Voir le numéro
  115.                                     </button>
  116.                                     {% if store.isFreeNumber is defined and store.isFreeNumber == true %}
  117.                                         <div class="d-none store-phone-number sva-free">
  118.                                             <div>{{ store.phoneNumber }}</div>
  119.                                             <div>Service & appel<br/>gratuits</div>
  120.                                         </div>
  121.                                     {% else %}
  122.                                         <a class="d-none store-phone-number text-primary mt-1"
  123.                                            href="tel:{{ store.phoneNumber|replace({' ': ''}) }}"><span
  124.                                                     class="bi bi-telephone-fill"></span>
  125.                                             <span class="phone-size">{{ store.phoneNumber }}</span></a>
  126.                                     {% endif %}
  127.                                 {% endif %}
  128.                             {% endif %}
  129.                         {% endif %}
  130.                     </div>
  131.                     <!-- End Col -->
  132.                 </div>
  133.                 <!-- End Row -->
  134.             </div>
  135.         </div>
  136.         <!-- End Media -->
  137.     </div>
  138. </div>
  139. <!-- End Card -->