<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* areas/gallery-carousel/view.html.twig */
class __TwigTemplate_229606ad80ad16130ab963758f04ddd5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/gallery-carousel/view.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/gallery-carousel/view.html.twig"));
// line 1
echo "<section class=\"area-gallery-carousel\">
";
// line 2
$context["selectStore"] = [];
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(2, 29));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 4
echo " ";
$context["selectStore"] = twig_array_merge((isset($context["selectStore"]) || array_key_exists("selectStore", $context) ? $context["selectStore"] : (function () { throw new RuntimeError('Variable "selectStore" does not exist.', 4, $this->source); })()), [0 => $context["i"]]);
// line 5
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 6
echo "
";
// line 7
$context["slidesSelect"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "slides", ["store" => // line 8
(isset($context["selectStore"]) || array_key_exists("selectStore", $context) ? $context["selectStore"] : (function () { throw new RuntimeError('Variable "selectStore" does not exist.', 8, $this->source); })()), "reload" => true, "width" => 70, "class" => "align-middle"]);
// line 13
echo "
";
// line 14
$context["showPreviewsCheckbox"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "showPreviews", ["class" => "align-middle pt-7px"]);
// line 15
echo " ";
$context["showPreviews"] = (twig_get_attribute($this->env, $this->source, (isset($context["showPreviewsCheckbox"]) || array_key_exists("showPreviewsCheckbox", $context) ? $context["showPreviewsCheckbox"] : (function () { throw new RuntimeError('Variable "showPreviewsCheckbox" does not exist.', 15, $this->source); })()), "isChecked", [], "any", false, false, false, 15) && !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 15, $this->source); })()));
// line 16
echo "
";
// line 17
$context["id"] = ("gallery-carousel-" . $this->env->getFunction('uniqid')->getCallable()());
// line 18
echo " ";
$context["slides"] = ((twig_get_attribute($this->env, $this->source, ($context["slidesSelect"] ?? null), "getData", [], "method", true, true, false, 18)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["slidesSelect"] ?? null), "getData", [], "method", false, false, false, 18), 2)) : (2));
// line 19
echo "
";
// line 20
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 20, $this->source); })())) {
// line 21
echo "
<div class=\"alert alert-secondary col-xs-12\" style=\"height: 75px\">
<div class=\"col-xs-6 d-inline mx-auto\">
<span class=\"editmode-label align-middle\">How many images you want to show?</span>
";
// line 25
echo (isset($context["slidesSelect"]) || array_key_exists("slidesSelect", $context) ? $context["slidesSelect"] : (function () { throw new RuntimeError('Variable "slidesSelect" does not exist.', 25, $this->source); })());
echo "
</div>
<div class=\"col-xs-6 d-inline ml-5\">
<span class=\"editmode-label align-middle\">Show Previews</span>
";
// line 29
echo (isset($context["showPreviewsCheckbox"]) || array_key_exists("showPreviewsCheckbox", $context) ? $context["showPreviewsCheckbox"] : (function () { throw new RuntimeError('Variable "showPreviewsCheckbox" does not exist.', 29, $this->source); })());
echo "
</div>
</div>
";
}
// line 34
echo "
<div id=\"";
// line 35
echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 35, $this->source); })()), "html", null, true);
echo "\" class=\"gallery carousel slide\" data-ride=\"carousel\" ";
echo (((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 35, $this->source); })())) ? ("data-interval=\"false\"") : (""));
echo ">
<!-- Indicators -->
<ol class=\"carousel-indicators ";
// line 37
echo (((isset($context["showPreviews"]) || array_key_exists("showPreviews", $context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.', 37, $this->source); })())) ? ("preview visible-lg") : (""));
echo "\">
";
// line 39
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["slides"]) || array_key_exists("slides", $context) ? $context["slides"] : (function () { throw new RuntimeError('Variable "slides" does not exist.', 39, $this->source); })()) - 1)));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 40
echo "
<li data-target=\"#";
// line 41
echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 41, $this->source); })()), "html", null, true);
echo "\" data-slide-to=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\" class=\"";
echo ((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 41)) ? ("active") : (""));
echo "\">
";
// line 42
if ((isset($context["showPreviews"]) || array_key_exists("showPreviews", $context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.', 42, $this->source); })())) {
// line 43
echo " ";
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", ("image_" . // line 44
$context["i"]), ["thumbnail" => "galleryCarouselPreview"]);
// line 47
echo "
";
}
// line 49
echo " </li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 52
echo " </ol>
<div class=\"carousel-inner\">
";
// line 55
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["slides"]) || array_key_exists("slides", $context) ? $context["slides"] : (function () { throw new RuntimeError('Variable "slides" does not exist.', 55, $this->source); })()) - 1)));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 56
echo " <div class=\"carousel-item ";
echo twig_escape_filter($this->env, (((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 56, $this->source); })()) . "-") . $context["i"]), "html", null, true);
echo " ";
echo ((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 56)) ? ("active") : (""));
echo "\">
";
// line 57
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", ("image_" . // line 58
$context["i"]), ["thumbnail" => "galleryCarousel", "hidetext" => true, "dropClass" => (( // line 61
(isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 61, $this->source); })()) . "-") . $context["i"]), "imgAttributes" => ["class" => "d-block w-100"]]);
// line 64
echo "
<div class=\"carousel-caption text-center ";
// line 66
echo (((isset($context["showPreviews"]) || array_key_exists("showPreviews", $context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.', 66, $this->source); })())) ? ("vh-10") : (""));
echo "\">
<h3>";
// line 67
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", ("caption-title_" . $context["i"]));
echo "</h3>
<p class=\"hero-text\">";
// line 68
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", ("caption-text" . $context["i"]));
echo "</p>
<p>";
// line 69
$context["cLink"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", ("caption-link" . $context["i"]), ["class" => "btn btn-lg btn-primary"]);
// line 72
echo " ";
echo (isset($context["cLink"]) || array_key_exists("cLink", $context) ? $context["cLink"] : (function () { throw new RuntimeError('Variable "cLink" does not exist.', 72, $this->source); })());
echo "
</p>
</div>
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
echo " </div>
<a class=\"carousel-control carousel-control-prev\" href=\"#";
// line 79
echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 79, $this->source); })()), "html", null, true);
echo "\" role=\"button\" data-slide=\"prev\">
<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
<span class=\"sr-only\">Previous</span>
</a>
<a class=\"carousel-control carousel-control-next\" href=\"#";
// line 83
echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 83, $this->source); })()), "html", null, true);
echo "\" role=\"button\" data-slide=\"next\">
<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
<span class=\"sr-only\">Next</span>
</a>
</div>
</section>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "areas/gallery-carousel/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 261 => 83, 254 => 79, 250 => 77, 230 => 72, 228 => 69, 224 => 68, 220 => 67, 216 => 66, 212 => 64, 210 => 61, 209 => 58, 208 => 57, 201 => 56, 184 => 55, 179 => 52, 163 => 49, 159 => 47, 157 => 44, 155 => 43, 153 => 42, 145 => 41, 142 => 40, 125 => 39, 120 => 37, 113 => 35, 110 => 34, 102 => 29, 95 => 25, 89 => 21, 87 => 20, 84 => 19, 81 => 18, 79 => 17, 76 => 16, 73 => 15, 71 => 14, 68 => 13, 66 => 8, 65 => 7, 62 => 6, 56 => 5, 53 => 4, 48 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<section class=\"area-gallery-carousel\">
{% set selectStore = [] %}
{% for i in 2..29 %}
{% set selectStore = selectStore|merge([i]) %}
{% endfor %}
{% set slidesSelect = pimcore_select('slides', {
store: selectStore,
reload: true,
width: 70,
class: 'align-middle'
}) %}
{% set showPreviewsCheckbox = pimcore_checkbox('showPreviews', {class: 'align-middle pt-7px'}) %}
{% set showPreviews = showPreviewsCheckbox.isChecked and not editmode %}
{% set id = 'gallery-carousel-' ~ uniqid() %}
{% set slides = slidesSelect.getData()|default(2) %}
{% if editmode %}
<div class=\"alert alert-secondary col-xs-12\" style=\"height: 75px\">
<div class=\"col-xs-6 d-inline mx-auto\">
<span class=\"editmode-label align-middle\">How many images you want to show?</span>
{{ slidesSelect|raw }}
</div>
<div class=\"col-xs-6 d-inline ml-5\">
<span class=\"editmode-label align-middle\">Show Previews</span>
{{ showPreviewsCheckbox|raw }}
</div>
</div>
{% endif %}
<div id=\"{{ id }}\" class=\"gallery carousel slide\" data-ride=\"carousel\" {{ editmode ? 'data-interval=\"false\"' : '' }}>
<!-- Indicators -->
<ol class=\"carousel-indicators {{ showPreviews ? 'preview visible-lg' }}\">
{% for i in 0..(slides-1) %}
<li data-target=\"#{{ id }}\" data-slide-to=\"{{ i }}\" class=\"{{ loop.first ? 'active' }}\">
{% if showPreviews %}
{{
pimcore_image('image_' ~ i, {
thumbnail: 'galleryCarouselPreview',
})
}}
{% endif %}
</li>
{% endfor %}
</ol>
<div class=\"carousel-inner\">
{% for i in 0..(slides-1) %}
<div class=\"carousel-item {{ id ~ '-' ~ i }} {{ loop.first ? 'active' }}\">
{{
pimcore_image('image_' ~ i, {
thumbnail: 'galleryCarousel',
hidetext: true,
dropClass: id ~ '-' ~ i,
imgAttributes: {class: 'd-block w-100'}
})
}}
<div class=\"carousel-caption text-center {{ showPreviews ? 'vh-10' : ''}}\">
<h3>{{ pimcore_input('caption-title_' ~ i) }}</h3>
<p class=\"hero-text\">{{ pimcore_textarea('caption-text' ~ i) }}</p>
<p>{% set cLink = pimcore_link('caption-link' ~ i, {
'class': 'btn btn-lg btn-primary'
}) %}
{{ cLink|raw }}
</p>
</div>
</div>
{% endfor %}
</div>
<a class=\"carousel-control carousel-control-prev\" href=\"#{{ id }}\" role=\"button\" data-slide=\"prev\">
<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
<span class=\"sr-only\">Previous</span>
</a>
<a class=\"carousel-control carousel-control-next\" href=\"#{{ id }}\" role=\"button\" data-slide=\"next\">
<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
<span class=\"sr-only\">Next</span>
</a>
</div>
</section>
", "areas/gallery-carousel/view.html.twig", "/usr/local/www/apache24/data/pimcore.3.uniquos.digital/pimcore/templates/areas/gallery-carousel/view.html.twig");
}
}