templates/areas/apk-products-image/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="uk-container apk-container-1400 uk-margin-medium">
  3.     <h2 class="uk-h2">Section Product Images</h2>
  4.     <ul uk-tab>
  5.         <li><a href="#">Configurations</a></li>
  6.         <li class="uk-active"><a href="#">Content Edit</a></li>
  7.     </ul>
  8.     <ul class="uk-switcher uk-margin">
  9.         <li>
  10.             <div>Type de heading pour le titre ?</div>
  11.             {{ pimcore_select("content-heading", {
  12.                 "store" : [
  13.                     ['span', 'span'],
  14.                     ['h1', 'Heading 1'],
  15.                     ['h2', 'Heading 2'],
  16.                     ['h3', 'Heading 3'],
  17.                     ['h4', 'Heading 4'],
  18.                     ['h5', 'Heading 5'],
  19.                     ['h6', 'Heading 6']
  20.                 ],
  21.                 "defaultValue" : "h2"
  22.             }) }}
  23.             <div><strong>Style</strong> du heading pour le titre ?</div>
  24.             {{ pimcore_select("content-heading-style", {
  25.                 "store" : [
  26.                     ['h1', 'Heading 1'],
  27.                     ['h2', 'Heading 2'],
  28.                     ['h3', 'Heading 3'],
  29.                     ['h4', 'Heading 4'],
  30.                     ['h5', 'Heading 5'],
  31.                     ['h6', 'Heading 6']
  32.                 ],
  33.                 "defaultValue" : "h2"
  34.             }) }}
  35.             
  36.             <div><strong>Alignement</strong> des textes du titre</div>
  37.             {{ pimcore_select("text-align", {
  38.                 "store" : [
  39.                     ['uk-text-center', 'Centré'],
  40.                     ['uk-text-left', 'Gauche'],
  41.                     ['uk-text-right', 'Droite']
  42.                 ],
  43.                 "defaultValue" : "uk-text-center"
  44.             }) }}
  45.             
  46.             <div>Espacement en haut du block</div>
  47.             {{ pimcore_select("margin-top", {
  48.                 "store" : [
  49.                     ['', 'Aucun'],
  50.                     ['uk-margin-small-top', 'Petit'],
  51.                     ['uk-margin-medium-top', 'Moyen'],
  52.                     ['uk-margin-large-top', 'Grand'],
  53.                     ['uk-margin-xlarge-top', 'Très grand'],
  54.                 ],
  55.                 "defaultValue" : ""
  56.             }) }}
  57.             <div>Espacement en bas du block</div>
  58.             {{ pimcore_select("margin-bottom", {
  59.                 "store" : [
  60.                     ['', 'Aucun'],
  61.                     ['uk-margin-small-bottom', 'Petit'],
  62.                     ['uk-margin-medium-bottom', 'Moyen'],
  63.                     ['uk-margin-large-bottom', 'Grand'],
  64.                     ['uk-margin-xlarge-bottom', 'Très grand'],
  65.                 ],
  66.                 "defaultValue" : ""
  67.             }) }}
  68.             
  69.         </li>
  70.     
  71.         <li class="uk-active">
  72.             <div class="uk-margin-large-bottom">
  73.                 <div class="apk-content">
  74.                     <div><strong>Titre</strong></div>
  75.                     <h2 class="uk-h2">
  76.                         {{ pimcore_textarea("content-title", {'nl2br' : true}) }}
  77.                     </h2>
  78.                     <div><strong>Sous-titre</strong></div>
  79.                     {{ pimcore_textarea("content-subtitle") }}
  80.                     <div><strong>Repeater de produits</strong></div>
  81.                     {% for row in pimcore_block('products').iterator %}
  82.                         <div uk-alert>
  83.                             <div><strong>Univers</strong>du produit</div>
  84.                             {{ pimcore_select("product-universe", {
  85.                                 "store" : [
  86.                                     ['apk-universe-magnecaps', 'Magnecaps'],
  87.                                     ['apk-universe-muscles', 'Magnecaps Muscles'],
  88.                                     ['apk-universe-relax', 'Magnecaps Relax'],
  89.                                     ['apk-universe-memory-concentration', 'Magnecaps Mem. & Concen.']
  90.                                 ],
  91.                                 "defaultValue" : "apk-universe-magnecaps"
  92.                             }) }}
  93.                             <div><strong>Titre du produit</strong></div>
  94.                             {{ pimcore_textarea("product-subtitle") }}
  95.                             <div><strong>image dans l'hexagone (de préférence carrée)</strong></div>
  96.                             {{ pimcore_image('hexagone-image', {'width' : 300, 'height' : 300}) }}
  97.                             <div><strong>image du produit</strong></div>
  98.                             {{ pimcore_image('product-image', {'width' : 300, 'height' : 300}) }}
  99.                             <strong></strong>Lien (optionnel)<span></span>
  100.                             {{ pimcore_link("content-btn", {
  101.                                 "class" : "uk-button"
  102.                             }) }}
  103.                             <hr>
  104.                             <dt>Google Analytics Event: Action</dt>
  105.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
  106.                             <hr>
  107.                             <dt>Google Analytics Event: Category</dt>
  108.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
  109.                             <hr>
  110.                             <dt>Google Analytics Event: Label</dt>
  111.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
  112.                             
  113.                         </div>
  114.                     {% endfor %}
  115.                     
  116.                 </div>
  117.             </div>
  118.         </li>
  119.     </ul>
  120. </div>
  121. {% endif %}
  122. {% set buttonColor = pimcore_select("button-color").data %}
  123. {% if not editmode %}
  124. <div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
  125.     <div class="uk-container apk-container-1400">
  126.         <div class="{{ pimcore_select("text-align") }}">
  127.             {% if not pimcore_textarea("content-title").isEmpty %}
  128.                 {% if pimcore_select("content-heading").getData() == 'span' %}
  129.                     <span class="uk-h2">
  130.                         {{ pimcore_textarea("content-title", {
  131.                         "nl2br" : true})|raw }}
  132.                     </span>
  133.                 {% else %}
  134.                     {% set content_heading = pimcore_select("content-heading").getData() %}
  135.                     <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  136.                         {{ pimcore_textarea("content-title", {
  137.                         "nl2br" : true})|raw }}
  138.                     </{{ content_heading }}>
  139.                 {% endif %}
  140.             {% endif %}
  141.             <span class="apk-subtitle">{{ pimcore_textarea("content-subtitle") }}</span>
  142.         </div>
  143.         <div class="apk-products-image-container"  uk-height-match="target: .apk-products-image-box--title">
  144.             <div class="uk-grid-medium uk-child-width-expand@m" uk-grid uk-height-match="target: .apk-products-image-box--media">
  145.                 {% for row in pimcore_block('products').iterator %}
  146.                 <div class="uk-flex uk-flex-center">
  147.                     <div class="apk-products-image-box">
  148.                         <div class="apk-products-image-box--title">
  149.                             <span class="uk-h3">{{ pimcore_textarea("product-subtitle", {'htmlspecialchars' : false, 'nl2br' : true }) }}</span>
  150.                         </div>
  151.                         <div class="apk-products-image-box--hexagone hexagone">
  152.                             {% if pimcore_image('hexagone-image') %}
  153.                                 {{ pimcore_image('hexagone-image').thumbnail('hexagone-thumb').html|raw }}    
  154.                             {% endif %}
  155.                         </div>
  156.                         <div class="apk-products-image-box--media">
  157.                             {% if pimcore_image('product-image') %}
  158.                                 {{ pimcore_image('product-image').thumbnail('hexagone-thumb').html|raw }}    
  159.                             {% endif %}
  160.                         </div>
  161.                         
  162.                         {% if not pimcore_link("content-btn").isEmpty() %}
  163.                         <div class="apk-products-image-box--action">
  164.                             {% if
  165.                                 not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  166.                                 and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty 
  167.                                 and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty 
  168.                             %}
  169.             
  170.                                 {{ pimcore_link("content-btn", {
  171.                                     "class" : "uk-button " ~ pimcore_select("product-universe").data,
  172.                                     "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  173.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  174.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  175.                                 }) }}
  176.             
  177.                             {% else %}
  178.                             
  179.                                 {{ pimcore_link("content-btn", {
  180.                                     "class" : "uk-button " ~ pimcore_select("product-universe").data 
  181.                                 }) }}
  182.                             {% endif %}
  183.                         </div>    
  184.                         {% endif %}
  185.                     </div>
  186.                 </div>
  187.                 {% endfor %}
  188.                 
  189.             </div>
  190.         </div>
  191.     </div>
  192.     
  193. </div>
  194. {% endif %}