src/Develey/LoewensenfBundle/Resources/views/Areas/TeaserProductStory/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. {% set hasSliderSelect %}
  16.     {{ pimcore_select("hasSlider", {
  17.         "store": [
  18.         ["has-slider", "Slider"],
  19.         ["no-slider", "Listenansicht"]
  20.         ],
  21.         "width": 300,
  22.         "reload": true
  23.     }) }}
  24. {% endset %}
  25. {% set colSelect %}
  26.     {{ pimcore_select("cols", {
  27.         "store": [
  28.         ["xs-12 full", "1"],
  29.         ["xs-12 m-6 half", "2"],
  30.         ["xs-12 m-6 l-6 xl-4 one-third", "3"]
  31.         ],
  32.         "width": 300,
  33.         "reload": true
  34.     }) }}
  35. {% endset %}
  36. {% set colsSelectResult = pimcore_select("cols").getData() %}
  37. {% if editmode %}
  38.     <div class="flex-col offset-bottom-single">
  39.         <div class="col xs-12 m-6 l-3">
  40.             <span class="hint">{{ 'ID für Anchorlinks vergeben' |trans }}</span>
  41.             {{ pimcore_input("brickAnchorIdInput") }}
  42.         </div>
  43.         <div class="col xs-12 m-6 l-3">
  44.             <div class="select-items">
  45.                 <div class="hint">
  46.                     {{ 'Kein Abstand nach oben?' |trans }}
  47.                 </div>
  48.                 {{ spacingSelect }}
  49.             </div>
  50.         </div>
  51.         <div class="col xs-12 m-6 l-3">
  52.             <span class="hint">{{ 'Teaser Content Breite:' |trans }}</span>
  53.             {{ colSelect }}
  54.         </div>
  55.         <div class="col xs-12 m-6 l-3">
  56.             <span class="hint">{{ ' Darstellungsart:' |trans }}</span>
  57.             {{ hasSliderSelect }}
  58.         </div>
  59.     </div>
  60. {% endif %}
  61.     {% if editmode %}
  62. <div class="admin teaser-panel-row teaser-product-story">
  63.     {% endif %}
  64.     <div id="{{ brickAnchorId }}" class="section {{ noSpacingTop }}">
  65.         <div class="panel {% if editmode %} {% else %}{{ pimcore_select("hasSlider").getData() }} {% endif %}{% if colsSelectResult == 'xs-12 m-6 half' %}half{% elseif colsSelectResult == 'xs-12 full' %}full{% else %}one-third{% endif %}">
  66.             <div class="main-content">
  67.                 <div class="panel-container">
  68.                     <div class="panel-content">
  69.                         <div class="flex-col panel-slider">
  70.                             {% if pimcore_block('contentblock').isEmpty() and editmode %}
  71.                                 <span class="hint">{{ 'Bitte wählen Sie die Anzahl der Teaser'|trans }}</span>
  72.                             {% endif %}
  73.                             {% for i in pimcore_iterate_block(pimcore_block('contentblock')) %}
  74.                                 {% set productLink = pimcore_href("selectProduct").getElement() %}
  75.                                 <div class="col {{ colsSelectResult }}">
  76.                                     {% if editmode %}
  77.                                         <div class="flex-col offset-bottom-single config-row-{{ colsSelectResult == 'xs-12 full' ? 'full' : 'half' }}">
  78.                                             <div>
  79.                                                 <div class="offset-top-single">
  80.                                                     <span class="hint">{{ 'Schärfegrad angeben?' |trans }}</span>
  81.                                                     {{ 'Ja' |trans }}{{ pimcore_checkbox("heatCheckbox", {
  82.                                                         "reload" : true }) }}
  83.                                                 </div>
  84.                                                 <div class="offset-top-single">
  85.                                                     <span class="hint">{{ 'Verlinkung zu bestehendem Produkt?'|trans }}</span>
  86.                                                     {{ pimcore_href("selectProduct", {
  87.                                                         "types": ["object"],
  88.                                                         "subtypes": {
  89.                                                             "types": ["object"],
  90.                                                         },
  91.                                                         "classes": ["ProductFood", "ProductClothing", "Product"],
  92.                                                         "width": 300,
  93.                                                         "reload": true
  94.                                                     }) }}
  95.                                                 </div>
  96.                                             </div>
  97.                                             <div>
  98.                                                 <div class="offset-top-single">
  99.                                                     <span class="hint">{{ 'Hintergrundbild festlegen'|trans }}</span>
  100.                                                     {{ pimcore_image("TeaserProductStoryImage", {
  101.                                                         "title": "Drag your image here",
  102.                                                         "thumbnail": "TeaserProductStoryImageFull" ~ bundleName,
  103.                                                         "reload" : true
  104.                                                     }) }}
  105.                                                 </div>
  106.                                             </div>
  107.                                         </div>
  108.                                     {% endif %}
  109.                                     {% if pimcore_href("selectProduct").isEmpty() != true %}
  110.                                         {% set detailViewUri    = pimcore_url(
  111.                                         {
  112.                                         "name": productLink.getName()|sanitized_url,
  113.                                         "articlenumber": productLink.getArticleNumber()
  114.                                         },
  115.                                         "shopHandlerProductDetail"
  116.                                         ) %}
  117.                                     {% endif %}
  118.                                     <div class="teaser story-item">
  119.                                         <div class="teaser-content">
  120.                                             {# background image #}
  121.                                             <div class="teaser-image">
  122.                                                 {# product link #}
  123.                                                 <a href="{{ pimcore_href("selectProduct").isEmpty() != true ? detailViewUri : pimcore_link("productStoryLink").getHref() }}" target="{{ pimcore_link("productStoryLink").getTarget() }}" aria-label="Open Details">
  124.                                                     {% if pimcore_href("selectProduct").isEmpty() != true %}
  125.                                                         <div class="teaser-image-front">
  126.                                                             <div>
  127.                                                                 {{ productLink.getProductImage().getThumbnail("TeaserProductStoryBottle" ~ bundleName).getHTML({class: 'teaser-product-story-bottle'}) |raw }}
  128.                                                             </div>
  129.                                                         </div>
  130.                                                         {# product image assets #}
  131.                                                     {% elseif pimcore_image("TeaserProductStoryBottle") %}
  132.                                                         <div class="teaser-image-front">
  133.                                                             <div>
  134.                                                             {% if pimcore_image("TeaserProductStoryBottle").isEmpty() and editmode %}
  135.                                                                 <span class="hint">{{ 'Produktbild' |trans }}</span>
  136.                                                             {% endif %}
  137.                                                             {{ pimcore_image("TeaserProductStoryBottle", {
  138.                                                                 "title": "Drag your image here",
  139.                                                                 "thumbnail": "TeaserProductStoryBottle" ~ bundleName,
  140.                                                                 'class': 'teaser-product-story-bottle'
  141.                                                             }) }}
  142.                                                             </div>
  143.                                                         </div>
  144.                                                     {% endif %}
  145.                                                     <div class="image">
  146.                                                         {% if pimcore_image("TeaserProductStoryImage").isEmpty() != true %}
  147.                                                             {# thumbnail #}
  148.                                                             {% if colsSelectResult == 'xs-12 full' %}
  149.                                                                 {{ pimcore_image("TeaserProductStoryImage").getThumbnail("TeaserProductStoryImageFull" ~ bundleName).getHTML() |raw }}
  150.                                                             {% else %}
  151.                                                                 {{ pimcore_image("TeaserProductStoryImage").getThumbnail("TeaserProductStoryImage" ~ bundleName).getHTML() |raw }}
  152.                                                             {% endif %}
  153.                                                             {# heat select #}
  154.                                                             {% if pimcore_checkbox('heatCheckbox').isChecked() %}
  155.                                                                 <div class="heat-select flex-col">
  156.                                                                     {% for i in pimcore_iterate_block(pimcore_block('heatSelect')) %}
  157.                                                                         <span class="icon flame-red"></span>
  158.                                                                     {% endfor %}
  159.                                                                 </div>
  160.                                                             {% endif %}
  161.                                                         {% endif %}
  162.                                                     </div>
  163.                                                 </a>
  164.                                             </div>
  165.                                             {# teaser box #}
  166.                                             <div class="teaser-text-box {% if pimcore_image("TeaserProductStoryBottle") is not empty or pimcore_href("selectProduct").isEmpty() != true %}with-front-img{% endif %}">
  167.                                                 {# product image object #}
  168.                                                 <div class="teaser-text-container">
  169.                                                     {# text box #}
  170.                                                     <div class="title-box">
  171.                                                         <h4>{{ pimcore_input("TeaserProductStoryHeadline", {
  172.                                                                 "placeholder": 'Teaser Headline'
  173.                                                             })|trademark }}
  174.                                                         </h4>
  175.                                                         {{ pimcore_wysiwyg("TeaserProductStoryContent", {
  176.                                                             "placeholder": 'Teaser Content'
  177.                                                         })|trademark }}
  178.                                                     </div>
  179.                                                     {# teaser link #}
  180.                                                     <div class="{{ editmode != true  ? 'teaser-link'}}">
  181.                                                         {% if pimcore_href("selectProduct").isEmpty() != true %}
  182.                                                             <a class="button" href="{{ detailViewUri }}" aria-label="{{ 'Zum Produkt'|trans }}">
  183.                                                                 <span>
  184.                                                                     {{ 'Zum Produkt'|trans }}
  185.                                                                 </span>
  186.                                                             </a>
  187.                                                         {% else %}
  188.                                                             {% if editmode %}
  189.                                                                 <div style="padding-top: 15px;">
  190.                                                                     {{ pimcore_link('productStoryLink', {'class': "button"}) }}
  191.                                                                 </div>
  192.                                                             {% else %}
  193.                                                                 <a class="button" href="{{ pimcore_link('productStoryLink').getHref() }}" target="{{ pimcore_link("productStoryLink").getTarget() }}" aria-label="{{ pimcore_link('productStoryLink').getText() }}">
  194.                                                                     <span>{{ pimcore_link('productStoryLink').getText() }}</span>
  195.                                                                 </a>
  196.                                                             {% endif %}
  197.                                                         {% endif %}
  198.                                                     </div>
  199.                                                 </div>
  200.                                             </div>
  201.                                         </div>
  202.                                     </div>
  203.                                 </div>
  204.                             {% endfor %}
  205.                         </div>
  206.                     </div>
  207.                 </div>
  208.             </div>
  209.         </div>
  210.     </div>
  211.     {% if editmode %}
  212. </div>
  213. {% endif %}