{% if editmode %}
{{ include('includes/backend-kopf.html.twig') }}
{% set tabContentArray = {1: 'Optional', 2: 'Content'} %}
{% set tab = 1 %}
<div id="content">
{% if tabContentArray is defined and tab in tabContentArray|keys %}
{{ admin_tabs(tab, tabContentArray) | raw }}
<section class="tabContent">
<p class="hl">Optionale Einstellung:</p>
{% set element = 'artikel' %}
<div id="{{ element }} ">
{{ pimcore_multiselect(element, {
'width': 200,
'height': 100,
'store': [
['abstand-top', 'Abstand nach oben'],
['abstand-bottom', 'Abstand nach unten']
]
}) }}
</div>
</section>
{% endif %}
{% if tabContentArray is defined and 2 in tabContentArray|keys %}
{{ admin_tabs(2, tabContentArray) | raw }}
<section class="tabContent">
<p class="hl">Optional Headline (H2):</p>
{{ pimcore_areablock("AreablockTop", {
"allowed": ["H2"],
"toolbar": false,
"areablock_toolbar": {
"title": "Content Konfiguration",
"width": 274,
"x": 570,
"y": 41,
"xAlign": "left",
"buttonWidth": 270,
"buttonMaxCharacters": 35
}
})
}}
<br /><br /><hr /><br /><br />
<p class="hl">Bitte Job-Objekt-Ordner zuweisen:</p>
<div class="dragdrop"><span class="parentbox">
{{ pimcore_relation("jobsfolder",{
"types": ["object"],
"width":550,
"reload": true,
"subtypes": {
"document": ["folder"],
"classes": ["jobs"]
}
}) }}
</span></div>
<br /><br /><br /><br />
</section>
{% endif %}
</div>
{{ include('includes/backend-fuss.html.twig') }}
{% else %}
{% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
{% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
{% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
{% set teaserID = document.getId() %}
<div class="{{ abstandClasses }}">
{% set areaBlock = pimcore_areablock("AreablockTop") %}
{% if areaBlock.isEmpty() == false %}
<div class="constrainer-maxsize edgepadding">
{{ areaBlock | raw }}
</div>
{% endif %}
<div class="constrainer-maxsize constrainer-maxsize--slider">
<div class="owl-carousel owl-theme no-underline" data-slider="{{ teaserID }}">
{% for key, element in jobTeaserSliderArray %}
{% if element.show is not empty %}
<section class="teaser-vertical--col-3 hover">
<a href="{{ element.teaser_link }}">
<header class="offer-header">
<h6 class="font-bold">{{ element.gueltigkeitszeitraum }}</h6>
<h3 class="theme-color font-bold">{{ element.teaser_title }}</h3>
</header>
<img
data-srcset="{{ element.teaser_bild_normal }}, {{ element.teaser_bild_retina }} 2x,"
alt="{{ element.teaser_bild__alttag }}" class="lazyload"/>
<div class="copy font-size-normal font-light">
{{ element.teaser_text | raw }}
</div>
<footer class="offer-footer">
<div class="btn-wrp arrow-button">
<button></button>
</div>
</footer>
</a>
</section>
{% endif %}
{% endfor %}
</div>
</div>
<script type="text/javascript">
(function () {
var moduleName = 'teaser_slider_{{ teaserID }}_module';
if (typeof selt === 'undefined') {
selt = {
modules: {}
};
} else if (!selt.modules) {
selt.modules = {};
}
selt.modules[moduleName] = {
name: moduleName,
init: function () {
init();
}
};
function init() {
galleryEl = $('[data-slider="{{ teaserID }}"]');
galleryEl.owlCarousel({
center: false,
loop: false,
items: 1,
margin: 0,
nav: true,
navText: [
'<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>',
'<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>'
],
responsive: {
1280: {
items: 3
},
950: {
items: 2
},
750: {
items: 2
}
}
}).on('resized.owl.carousel', function (event) {
galleryEl.trigger('refresh.owl.carousel');
});
galleryEl.find('.owl-item .copy').matchHeight({
byRow: false
});
}
}());
</script>
</div>
{% endif %}