templates/module/Jobs/__jobs-teaser-slider.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ include('includes/backend-kopf.html.twig') }}
  3.     {% set tabContentArray = {1: 'Optional', 2: 'Content'} %}
  4.     {% set tab = 1 %}
  5.     <div id="content">        
  6.             {% if tabContentArray is defined and tab in tabContentArray|keys %}
  7.                 {{ admin_tabs(tab, tabContentArray) | raw }}
  8.             
  9.                 <section class="tabContent">
  10.                     <p class="hl">Optionale Einstellung:</p>
  11.                     {% set element = 'artikel' %}
  12.                     <div id="{{ element }} ">
  13.                         {{ pimcore_multiselect(element, {
  14.                                 'width': 200,
  15.                                 'height': 100,
  16.                                 'store': [
  17.                                     ['abstand-top', 'Abstand nach oben'],
  18.                                     ['abstand-bottom', 'Abstand nach unten']
  19.                                 ]
  20.                             }) }}
  21.                     </div>
  22.                 </section>
  23.             {% endif %} 
  24.              {% if tabContentArray is defined and 2 in tabContentArray|keys %}
  25.                 {{ admin_tabs(2, tabContentArray) | raw }}
  26.                 <section class="tabContent">
  27.                      <p class="hl">Optional Headline (H2):</p>
  28.                         {{ pimcore_areablock("AreablockTop", {
  29.                                 "allowed": ["H2"],
  30.                                 "toolbar": false,
  31.                                 "areablock_toolbar": {
  32.                                     "title": "Content Konfiguration",
  33.                                     "width": 274,
  34.                                     "x": 570,
  35.                                     "y": 41,
  36.                                     "xAlign": "left",
  37.                                     "buttonWidth": 270,
  38.                                     "buttonMaxCharacters": 35
  39.                                 }
  40.                             })
  41.                         }}                        
  42.                     <br /><br /><hr /><br /><br />
  43.                     
  44.                     <p class="hl">Bitte Job-Objekt-Ordner zuweisen:</p>
  45.                     <div class="dragdrop"><span class="parentbox">
  46.                             {{ pimcore_relation("jobsfolder",{
  47.                                 "types": ["object"],
  48.                                 "width":550,
  49.                                 "reload": true,
  50.                                 "subtypes": {
  51.                                     "document": ["folder"],
  52.                                     "classes": ["jobs"]
  53.                                 }                                
  54.                             }) }}
  55.                     </span></div>
  56.                     <br /><br /><br /><br />
  57.                          
  58.                 </section>
  59.             {% endif %}
  60.     </div>
  61.     {{ include('includes/backend-fuss.html.twig') }}
  62. {% else %}
  63.     {% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
  64.     {% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
  65.     {% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
  66.     {% set teaserID = document.getId() %}
  67.     <div class="{{ abstandClasses }}">
  68.         {% set areaBlock = pimcore_areablock("AreablockTop") %}
  69.             {% if areaBlock.isEmpty() == false %}
  70.                 <div class="constrainer-maxsize edgepadding">
  71.                     {{ areaBlock | raw }}
  72.                 </div> 
  73.             {% endif %}     
  74.             <div class="constrainer-maxsize constrainer-maxsize--slider">
  75.                 <div class="owl-carousel owl-theme no-underline" data-slider="{{ teaserID }}">
  76.                     {% for key, element in jobTeaserSliderArray %}
  77.                         {% if element.show is not empty %}
  78.                             <section class="teaser-vertical--col-3 hover">
  79.                                 <a href="{{ element.teaser_link }}">
  80.                                     <header class="offer-header">
  81.                                         <h6 class="font-bold">{{ element.gueltigkeitszeitraum }}</h6>
  82.                                         <h3 class="theme-color font-bold">{{ element.teaser_title }}</h3>
  83.                                     </header>
  84.                                     <img
  85.                                          data-srcset="{{ element.teaser_bild_normal }}, {{ element.teaser_bild_retina }} 2x,"
  86.                                          alt="{{ element.teaser_bild__alttag }}" class="lazyload"/>
  87.                                     <div class="copy font-size-normal font-light">
  88.                                         {{ element.teaser_text | raw }}
  89.                                     </div>
  90.                                     <footer class="offer-footer">
  91.                                         <div class="btn-wrp arrow-button">
  92.                                             <button></button>
  93.                                         </div>
  94.                                     </footer>
  95.                                 </a>
  96.                             </section>
  97.                         {% endif %}
  98.                     {% endfor %}
  99.                 </div>
  100.             </div>
  101.         
  102.             <script type="text/javascript">
  103.                 (function () {
  104.                     var moduleName = 'teaser_slider_{{ teaserID }}_module';
  105.                     if (typeof selt === 'undefined') {
  106.                         selt = {
  107.                             modules: {}
  108.                         };
  109.                     } else if (!selt.modules) {
  110.                         selt.modules = {};
  111.                     }
  112.                     selt.modules[moduleName] = {
  113.                         name: moduleName,
  114.                         init: function () {
  115.                             init();
  116.                         }
  117.                     };
  118.                     function init() {
  119.                         galleryEl = $('[data-slider="{{ teaserID }}"]');
  120.                         galleryEl.owlCarousel({
  121.                             center: false,
  122.                             loop: false,
  123.                             items: 1,
  124.                             margin: 0,
  125.                             nav: true,
  126.                             navText: [
  127.                                 '<svg viewBox="0 0 27.2 105.2" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><polygon class="st0" points="25.4,105.2 0,52 25.4,0 27.2,0.9 2.2,52 27.2,104.3"/></svg>',
  128.                                 '<svg viewBox="0 0 27.2 105.2" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><polygon class="st0" points="25.4,105.2 0,52 25.4,0 27.2,0.9 2.2,52 27.2,104.3"/></svg>'
  129.                             ],
  130.                             responsive: {
  131.                                 1280: {
  132.                                     items: 3
  133.                                 },
  134.                                 950: {
  135.                                     items: 2
  136.                                 },
  137.                                 750: {
  138.                                     items: 2
  139.                                 }
  140.                             }
  141.                         }).on('resized.owl.carousel', function (event) {
  142.                             galleryEl.trigger('refresh.owl.carousel');
  143.                         });
  144.                         galleryEl.find('.owl-item .copy').matchHeight({
  145.                             byRow: false
  146.                         });
  147.                     }
  148.                 }());
  149.             </script>
  150.     </div>
  151. {% endif %}