{% extends 'module-layout.html.twig' %}
{% block content %}
{% if editmode %}
{{ include('includes/backend-kopf.html.twig') }}
{% set tabContentArray = {1: 'Optional'} %}
{% set tab = 1 %}
<div id="content">
{% if tabContentArray is defined and tab in tabContentArray|keys %}
{{ admin_tabs(tab, tabContentArray) | raw }}
{% endif %}
<section class="tabContent">
<div style="float:right;">
<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>
</div>
</section>
</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 selfId = document.getId() %}
<div class="page-title abstand-bottom abstand-top">
<h1 class="font-bold">{{ twigParams['content_headline'] }}</h1>
<hr class="deco-underline"/>
<h4 class="font-bold text-center">{{ twigParams['content_subheadline'] }}</h4>
</div>
{% if twigParams['show_slider'] is not empty %}
{% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true) %}
{% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
{% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
{#{% set sliderId = document.getId() %}#}
{% set showSnippetArray = [] %}
<div class="abstand-bottom abstand-top">
{% set areaBlock = pimcore_areablock("AreablockTop") %}
{% if areaBlock.isEmpty() == false %}
<div class="constrainer-maxsize edgepadding">
{{ areaBlock | raw }}
</div>
{% endif %}
{% set lang = app.request.getLocale() %}
<div class="{{ abstandClasses }}">
{% set random_gallery_id = random() %}
<div class="constrainer-maxsize abstand-top abstand-bottom">
<div class="owl-carousel owl-theme owl-nav-spacer" data-slider="{{ random_gallery_id }}" >
{% for key, image_path in twigParams['galleryArray'] %}
{% set imgPath = image_path.path %}
{% set imgTitle = image_path.title %}
<a class="chocolat-image" href="{{ imgPath }}" title="{{ imgTitle }}">
{% if imgPath is not empty %}
{% set lang = app.request.getLocale() %}
{{ imageResponsive({"src": imgPath,
"ausgabeformat": "img",
"endtag": true,
"language": lang }) | raw }}
{% endif %}
</a>
{% endfor %}
</div>
</div>
<script type="text/javascript">
(function () {
var moduleName = 'teaser_slider_{{ random_gallery_id }}_module'; // naming convention XXX_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="{{ random_gallery_id }}"]');
galleryEl.owlCarousel({
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: {
800: {
items: 3,
},
700: {
items: 2,
}
}
});
galleryEl.Chocolat({
loop: true
});
}
}());//EOS
</script>
</div>
</div>
{# <script type="text/javascript">#}
{# (function () {#}
{# var moduleName = 'language_selection';#}
{# if (typeof selt === 'undefined') {#}
{# selt = {#}
{# modules: {}#}
{# };#}
{# } else if (!selt.modules) {#}
{# selt.modules = {};#}
{# }#}
{# selt.modules[moduleName] = {#}
{# name: moduleName,#}
{# function init() #}{##}{#}#}
{# galleryEl = $('[data-slider="{{ sliderId }}"]');#}
{# #}{##}{# 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: #}{##}{#}#}
{# #}{##}{# 1180: #}{##}{#}#}
{# #}{##}{# items: {{ numberOfItems < 4 ? numberOfItems : 4 }}#}
{# #}{##}{# },#}
{# #}{##}{# 750: #}{##}{#}#}
{# #}{##}{# items: 2#}
{# #}{##}{# }#}
{# #}{##}{# }#}
{# #}{##}{# }).on('resized.owl.carousel', function (event) #}{##}{#}#}
{# #}{##}{# galleryEl.trigger('to.owl.carousel', [1, 1000]);#}
{# #}{##}{# });#}
{# };#}
{# function browserLanguage() {#}
{# var browserLanguageArray = [];#}
{# if (typeof navigator !== 'undefined') {#}
{# if (navigator.languages) { // chrome only; not an array, so can't use .push.apply instead of iterating#}
{# for (var i = 0; i < navigator.languages.length; i++) {#}
{# browserLanguageArray.push(navigator.languages[i]);#}
{# }#}
{# } else if (navigator.language) {#}
{# browserLanguageArray.push(navigator.language);#}
{# }#}
{# }#}
{# return browserLanguageArray.length > 0 ? browserLanguageArray[0] : undefined;#}
{# }#}
{# languageSelection = function () {#}
{# var langPreference = Cookies.get('language'),#}
{# currentLanguage = 'en',#}
{# url_english = 'https://www.oldy.glanzer.at/en',#}
{# notDE = (browserLanguage().indexOf("de") < 0);#}
{# // browserLang is not DE -- CMS is not serving EN#}
{# if (notDE && currentLanguage !== 'en') {#}
{# if (!langPreference) {#}
{# selt.overlay.open(#}
{# {#}
{# selector: '#languageselector',#}
{# callback: function () {#}
{# //console.log('overlay content done')#}
{# }#}
{# })#}
{# } else if (langPreference == 'en') {#}
{# window.location.assign(url_english);#}
{# }#}
{# }#}
{# selt.saveLanguagePreference = function saveLanguagePreference(lang) {#}
{# Cookies.set('language', lang, {expires: 14});#}
{# if (lang === 'en') {#}
{# window.location.assign(url_english);#}
{# }#}
{# // todo: $.fancybox.close();#}
{# }#}
{# }#}
{# }());//EOS#}
{# </script>#}
{# <div class="constrainer-maxsize abstand-top abstand-bottom">#}
{# <div class="owl-carousel owl-theme owl-nav-spacer" data-slider="{{ random_gallery_id }}"#}
{# {{ dump(image_path) }}#}
{# {% for key, image_path in twigParams['galleryArray'] %}#}
{# {{ dump(image_path) }}#}
{# <a class="chocolat-image" href="{{ image_path }}">#}
{# {% set lang = app.request.getLocale() %}#}
{# {% if image_path is not empty %}#}
{# {{ imageResponsive({"src": image_path,#}
{# "ausgabeformat": "img",#}
{# "endtag": false,#}
{# "language": lang }) | raw }}#}
{# {% endif %}#}
{# </a>#}
{# {% endfor %}#}
{# </div>#}
{# </div>#}
{% endif %}
{% if twigParams['show_text'] is not empty %}
<div class="constrainer-inner edgepadding abstand-bottom abstand-top">
<div class="copy font-light ">
{{ twigParams['content_text'] |raw }}
</div>
</div>
{% endif %}
<div class="constrainer-maxsize edgepadding abstand-top abstand-bottom">
<h2 class="font-thin texttitle"> {{ 'form_initiativbewerbung_h2'|trans }}
</h2>
{% if twigParams['frontend'] is not empty %}
{% set formTemplate = twigParams['frontend'].formular.formTemplate %}
{% if formTemplate is not empty %}
{% include 'module/Form/forms/'~formTemplate with {'frontend': twigParams['frontend']} %}
{% endif %}
{% endif %}
</div>
{% if twigParams['show_json'] %}
{% set jsonLd = {} %}
{% if twigParams['context'] is not empty %}
{% set jsonLd = jsonLd|merge({'@context': twigParams['context'] }) %}
{% endif %}
{% if twigParams['context_type'] is not empty %}
{% set jsonLd = jsonLd|merge({'@type': twigParams['context_type'] }) %}
{% endif %}
{% if twigParams['job_title'] is not empty %}
{% set jsonLd = jsonLd|merge({'title': twigParams['job_title'] }) %}
{% endif %}
{% if twigParams['job_description'] is not empty %}
{% set jsonLd = jsonLd|merge({'description': twigParams['job_description'] }) %}
{% endif %}
{% if twigParams['hiring_organization_type'] is not empty or twigParams['hiring_organization_name'] is not empty %}
{% set hiringOrganization = {} %}
{% if twigParams['hiring_organization_type'] is not empty %}
{% set hiringOrganization = hiringOrganization|merge({'@type': twigParams['hiring_organization_type'] }) %}
{% endif %}
{% if twigParams['hiring_organization_name'] is not empty %}
{% set hiringOrganization = hiringOrganization|merge({'name': twigParams['hiring_organization_name'] }) %}
{% endif %}
{% set jsonLd = jsonLd|merge({'hiringOrganization': hiringOrganization }) %}
{% endif %}
{% if twigParams['date_posted'] is not empty %}
{% set jsonLd = jsonLd|merge({'datePosted': twigParams['date_posted'] }) %}
{% endif %}
{% if twigParams['valid_through'] is not empty %}
{% set jsonLd = jsonLd|merge({'validThrough': twigParams['valid_through'] }) %}
{% endif %}
{% if twigParams['employment_type'] is not empty %}
{% set jsonLd = jsonLd|merge({'employmentType': twigParams['employment_type'] }) %}
{% endif %}
{% if twigParams['job_location_type'] is not empty or twigParams['job_location_address_type'] is not empty or twigParams['job_location_address_type'] is not empty or twigParams['job_location_address_street_address'] is not empty or twigParams['job_location_address_address_locality'] is not empty or twigParams['job_location_address_address_region'] is not empty or twigParams['job_location_address_postal_code'] is not empty or twigParams['job_location_address_address_country'] is not empty %}
{% set jobLocation = {} %}
{% if twigParams['job_location_type'] is not empty %}
{% set jobLocation = jobLocation|merge({'@type': twigParams['job_location_type'] }) %}
{% endif %}
{% if twigParams['job_location_address_type'] is not empty or twigParams['job_location_address_type'] is not empty or twigParams['job_location_address_street_address'] is not empty or twigParams['job_location_address_address_locality'] is not empty or twigParams['job_location_address_postal_code'] is not empty or twigParams['job_location_address_address_country'] is not empty %}
{% set address = {} %}
{% if twigParams['job_location_address_type'] is not empty %}
{% set address = address|merge({'@type': twigParams['job_location_address_type'] }) %}
{% endif %}
{% if twigParams['job_location_address_street_address'] is not empty %}
{% set address = address|merge({'streetAddress': twigParams['job_location_address_street_address'] }) %}
{% endif %}
{% if twigParams['job_location_address_address_locality'] is not empty %}
{% set address = address|merge({'addressLocality': twigParams['job_location_address_address_locality'] }) %}
{% endif %}
{% if twigParams['job_location_address_address_region'] is not empty %}
{% set address = address|merge({'addressRegion': twigParams['job_location_address_address_region'] }) %}
{% endif %}
{% if twigParams['job_location_address_postal_code'] is not empty %}
{% set address = address|merge({'postalCode': twigParams['job_location_address_postal_code'] }) %}
{% endif %}
{% if twigParams['job_location_address_address_country'] is not empty %}
{% set address = address|merge({'addressCountry': twigParams['job_location_address_address_country'] }) %}
{% endif %}
{% set jobLocation = jobLocation|merge({'address': address }) %}
{% endif %}
{% if twigParams['base_salary_type'] is not empty or twigParams['base_salary_currency'] is not empty %}
{% set baseSalary = {} %}
{% if twigParams['base_salary_type'] is not empty %}
{% set baseSalary = baseSalary|merge({'@type': twigParams['base_salary_type'] }) %}
{% endif %}
{% if twigParams['base_salary_currency'] is not empty %}
{% set baseSalary = baseSalary|merge({'currency': twigParams['base_salary_currency'] }) %}
{% endif %}
{% if twigParams['base_salary_value_type'] is not empty or twigParams['base_salary_value_unit_text'] is not empty or twigParams['base_salery_value_value'] is not empty %}
{% set baseSalaryValue = {} %}
{% if twigParams['base_salary_value_type'] is not empty %}
{% set baseSalaryValue = baseSalaryValue|merge({'@type': twigParams['base_salary_value_type'] }) %}
{% endif %}
{% if twigParams['base_salary_value_unit_text'] is not empty %}
{% set baseSalaryValue = baseSalaryValue|merge({'unitText': twigParams['base_salary_value_unit_text'] }) %}
{% endif %}
{% if twigParams['base_salery_value_value'] is not empty %}
{% set baseSalaryValue = baseSalaryValue|merge({'value': twigParams['base_salery_value_value'] }) %}
{% endif %}
{% set baseSalary = baseSalary|merge({'value': baseSalaryValue }) %}
{% endif %}
{% set jobLocation = jobLocation|merge({'baseSalary': baseSalary }) %}
{% endif %}
{% set jsonLd = jsonLd|merge({'jobLocation': jobLocation }) %}
{% endif %}
<script type="application/ld+json">
{{ jsonLd|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_UNESCAPED_UNICODE'))|raw }}
</script>
{% endif %}
{% endif %}
{% endblock %}