templates/Customer/Delivery/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'Customer/Delivery/base.html.twig' %}
  2. {% block javascripts %}
  3.     {{ parent() }}
  4.     {{ encore_entry_script_tags('customer/delivery-point-detail') }}
  5.     <script src="https://api.mapy.cz/loader.js"></script>
  6.     <script>Loader.load()</script>
  7. {% endblock %}
  8. {% block catchword %}
  9.     {% trans %}Výdejní místo{% endtrans %} - {{ dp.name }}
  10. {% endblock %}
  11. {% block content %}
  12.     <div class="row">
  13.         <div class="col"><a
  14.                     href="{{ path('customer_delivery_points') }}">{% trans %}Zpět na výpis výdejen{% endtrans %}</a>
  15.         </div>
  16.     </div>
  17.     <div class="row">
  18.         {% if (dp.getGpsLongitude != false and dp.getGpsLatitude != false) or dp.images is not empty %}
  19.         <div class="col-4">
  20.             {% if dp.getGpsLongitude != false and dp.getGpsLatitude != false %}
  21.                 <h5>{% trans from 'support' %}Mapa výdejny{% endtrans %}</h5>
  22.                 <div id="mapDiv" style="width:100%; height:400px;"></div>
  23.                 <span id='mapLatitude' class="d-none">{{ dp.gpsLatitude }}</span>
  24.                 <span id='mapLongitude' class="d-none">{{ dp.gpsLongitude }}</span>
  25.                 <div class="mt-2 d-flex justify-content-center">
  26.                     {% if dp.gps is not null %}
  27.                         <a href="https://mapy.cz/zakladni?q={{ dp.gps }}">Mapy.cz</a>
  28.                     {% endif %}
  29.                 </div>
  30.                 <hr>
  31.             {% endif %}
  32.             {% if dp.images is not empty %}
  33.                 <h5>{% trans from 'support' %}Obrázky{% endtrans %}</h5>
  34.                 {% for image in dp.images %}
  35.                     <div class="mt-2">
  36.                         <img alt="{% trans %}obrázek výdejny{% endtrans %}" width="100%" height=""
  37.                              src="{{ image.imageBase64 }}" class="image-object-fit-contain rounded">
  38.                     </div>
  39.                 {% endfor %}
  40.             {% endif %}
  41.         </div>
  42.         {% endif %}
  43.         <div class="col-8">
  44.             <div class="row">
  45.                 <table class="table table-borderless">
  46.                     <tbody>
  47.                     <tr>
  48.                         <th style="width: 25%">{% trans from 'support' %}Kód výdejny{% endtrans %}</th>
  49.                         <td id="dp-code">{{ dp.code }}</td>
  50.                     </tr>
  51.                     <tr>
  52.                         <th style="width: 25%">{% trans from 'support' %}Název{% endtrans %}</th>
  53.                         <td id="dp-name">{{ dp.name }}</td>
  54.                     </tr>
  55.                     <tr>
  56.                         <th style="width: 25%">{% trans from 'support' %}Adresa{% endtrans %}</th>
  57.                         <td id="address">{{ dp.address.address1 ~ ', ' ~ dp.address.city  ~ ', ' ~ (dp.address.district ? (dp.address.district ~ ', ')) ~ dp.address.zipCode }}</td>
  58.                     </tr>
  59.                     <tr>
  60.                         <th style="width: 25%">{% trans from 'support' %}Otevírací hodiny{% endtrans %}</th>
  61.                         <td id="dp-openingHours">{{ dp.openingHours }}</td>
  62.                     </tr>
  63.                     <tr>
  64.                         <th style="width: 25%">{% trans from 'support' %}Stav pobočky{% endtrans %}</th>
  65.                         <td id="dp-active">{{ dp.activeHandover ? 'Otevřeno' : 'Zavřeno' | trans }}</td>
  66.                     </tr>
  67.                     {% if dp.aboutUs is not empty %}
  68.                         <tr>
  69.                             <th style="width: 25%">{% trans from 'support' %}O nás{% endtrans %}</th>
  70.                             <td id="dp-aboutUs">{{ dp.aboutUs |nl2br }}</td>
  71.                         </tr>
  72.                     {% endif %}
  73.                     {% if dp.descriptionGeneral is not empty %}
  74.                         <tr>
  75.                             <th style="width: 25%">{% trans from 'support' %}Popis cesty{% endtrans %}</th>
  76.                             <td id="dp-descriptionGeneral">{{ dp.descriptionGeneral |nl2br }}</td>
  77.                         </tr>
  78.                     {% endif %}
  79.                     {% if dp.descriptionCar is not empty %}
  80.                         <tr>
  81.                             <th style="width: 25%">{% trans from 'support' %}Cesta autem{% endtrans %}</th>
  82.                             <td id="dp-descriptionCar">{{ dp.descriptionCar |nl2br }}</td>
  83.                         </tr>
  84.                     {% endif %}
  85.                     {% if dp.descriptionPublic is not empty %}
  86.                         <tr>
  87.                             <th style="width: 25%">{% trans from 'support' %}Cesta MHD{% endtrans %}</th>
  88.                             <td id="dp-descriptionPublic">{{ dp.descriptionPublic |nl2br }}</td>
  89.                         </tr>
  90.                     {% endif %}
  91.                     {% if dp.webSite is not empty and (dp.webSite starts with 'http') %}
  92.                         <tr>
  93.                             <th style="width: 25%">{% trans from 'support' %}Webová stránka výdejny{% endtrans %}</th>
  94.                             <td id="dp-webSite"><a href="{{ dp.webSite }}" target="_blank">{{ dp.webSite }}</a></td>
  95.                         </tr>
  96.                     {% endif %}
  97.                     </tbody>
  98.                 </table>
  99.             </div>
  100.             {% if holidays is not empty %}
  101.                 <div class="row">
  102.                     <div class="col-lg-8 col-md-12 col-sm-12 col-12">
  103.                         {% include 'Customer/Delivery/holidays_table.html.twig' with holidays %}
  104.                     </div>
  105.                 </div>
  106.             {% endif %}
  107.         </div>
  108.     </div>
  109. {% endblock %}