src/CoreBundle/Resources/views/Areas/ImageMap/view.html.twig line 1

Open in your IDE?
  1. {% set spacingSelect %}
  2.     {{ pimcore_checkbox("checkSpacing", {
  3.         "reload": true
  4.     }) }}
  5. {% endset %}
  6. {% set noSpacingTop = '' %}
  7. {% set brickAnchorId = '' %}
  8. {% if pimcore_checkbox('checkSpacing').isChecked() %}
  9.     {% set noSpacingTop = 'no-offset-top' %}
  10. {% endif %}
  11. {% set UID = uniqid() %}
  12. {% if pimcore_input("brickAnchorIdInput") is not empty %}
  13.     {% set brickAnchorId = pimcore_input("brickAnchorIdInput")|lowercase %}
  14. {% endif %}
  15. {% if editmode %}
  16.     <div class="flex-col offset-bottom-single">
  17.         <div class="col xs-12 m-6 l-3">
  18.             <span class="hint">{{ 'ID für Anchorlinks vergeben' |trans }}</span>
  19.             {{ pimcore_input("brickAnchorIdInput") }}
  20.         </div>
  21.         <div class="col xs-12 m-6 l-3">
  22.             <div class="select-items">
  23.                 <div class="hint">
  24.                     {{ 'Kein Abstand nach oben?' |trans }}
  25.                 </div>
  26.                 {{ spacingSelect }}
  27.             </div>
  28.         </div>
  29.     </div>
  30. {% endif %}
  31. <div id="{{ brickAnchorId }}" class="section {{ noSpacingTop }}">
  32.     <div class="image-map-wrapper">
  33.         <div class="main-content flex-col">
  34.             <div class="image-map-container col">
  35.                 {% if pimcore_image("imageMap").isEmpty() and editmode %}
  36.                     <span class="hint">{{ 'Hintergrundbild festlegen' |trans }}</span>
  37.                 {% endif %}
  38.                 {% set iterateHotspot = 0 %}
  39.                 {% if pimcore_image("imageMap").getHotspots() %}
  40.                     {% for i in pimcore_image("imageMap").getHotspots() %}
  41.                         {% set hotspot = pimcore_image("imageMap").getHotspots()[iterateHotspot] %}
  42.                         <div class="hotspot"
  43.                              style="top: {{ hotspot.top |number_format(2, '.', ',') }}%; left: {{ hotspot.left |number_format(2, '.', ',') }}%; width: {{ hotspot.width |number_format(2, '.', ',') }}%; height: {{ hotspot.height |number_format(2, '.', ',') }}%;">
  44.                             {{ pimcore_link("hotspotLink" ~ iterateHotspot, {
  45.                                 "reload": true
  46.                             }) }}
  47.                         </div>
  48.                         {% set iterateHotspot = iterateHotspot + 1 %}
  49.                     {% endfor %}
  50.                 {% endif %}
  51.                 {{ pimcore_image("imageMap", {
  52.                     "title": "Drag your image here",
  53.                     "thumbnail": "imageMap" ~ bundleName,
  54.                     "reload": true
  55.                 }) }}
  56.             </div>
  57.         </div>
  58.     </div>
  59. </div>