<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* areas/product-table-brick/view.html.twig */
class __TwigTemplate_964436efdd695f14360fa08b2cf3902c17d3be5f381a4f2428e00f84021e5a25 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
// line 1
$context["selectedProducts"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "selectedProducts"), "getData", [], "method", false, false, true, 1);
// line 2
$context["selectedProperties"] = CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "selectedProperties"), "getData", [], "method", false, false, true, 2);
// line 3
yield "
";
// line 4
yield from $this->loadTemplate("areas/product-table-brick/view.html.twig", "areas/product-table-brick/view.html.twig", 4, "1481781932")->unwrap()->yield($context);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-table-brick/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 57 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set selectedProducts = pimcore_relations('selectedProducts').getData() %}
{% set selectedProperties = pimcore_relations('selectedProperties').getData() %}
{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
{% if selectedProducts is empty %}
{% if editmode %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen alternatieve producten geselecteerd. {% endblock %}
{% block information %} Kies alternatieve producten middels het potloodje. {% endblock %}
{% endembed %}
{% endif %}
{% else %}
<section class=\"py-10 bg-blue-200 lg:py-20\" x-data=\"{ tableOpen: false }\">
<div class=\"overflow-hidden lg:container\">
{% if editmode and selectedProperties is empty %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen producteneigenschappen geselecteerd. {% endblock %}
{% block information %} Kies producteneigenschappen middels het potloodje {% endblock %}
{% endembed %}
{% endif %}
<div class=\"grid grid-cols-12 gap-6\">
<div class=\"col-span-12\">
<h2 class=\"mb-4 text-2xl text-center md:text-3xl lg:text-4xl\">
{% include 'areas/unique-selling-point-brick/partials/_title.html.twig' %}
</h2>
</div>
</div>
{#
Here we set the maxinum amount of specs that are shown on initial page load.
If there are more then this amount then those will be hidden, a button will then be shown
#}
{% set shownSpecsOnInitialLoad = 8 %}
{% set showReadMoreSpecsButton = false %}
<div class=\"px-0 overflow-x-auto lg:pb-6 lg:pr-6 \">
<table class=\"w-full lg:border-separate text-md lg:text-base lg:border-slate-500 lg:border-spacing-2\" >
{# First, we generate the table header based on the selected properties. #}
<thead class=\"bg-gray-50\">
<tr>
<th>
<!-- title -->
</th>
{% for property in selectedProperties ?: [] %}
<th scope=\"col\" class=\"px-4 py-2 font-normal text-left text-gray-900 lg:px-6 lg:py-4 {{ loop.index > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ property.title ?: property.key }}
</th>
{% endfor %}
<th class=\"hidden lg:table-cell\">
<!-- info -->
</th>
<th class=\"hidden lg:table-cell\">
<!-- button -->
</th>
<th>
<!-- chevron -->
</th>
</tr>
</thead>
{# then, we will output the product-rows #}
<tbody class=\"gap-6\" x-data=\"{ rowOpen: false }\">
{% for product in selectedProducts %}
<tr
x-description=\"Odd row\"
class=\"bg-white border-t-8 border-blue-200 lg:border-t-0\"
{% if loop.index >= shownSpecsOnInitialLoad %}
:class=\"tableOpen ? '' : 'hidden'\"
{% endif %}
>
{# Output the product title as the first column in this row #}
<td class=\"px-4 py-5 mb-4 font-bold leading-4 text-md lg:text-xl lg:px-6 lg:py-4 lg:rounded-l-md whitespace-nowrap\">
<a href=\"{{ product.page.url | trimUrl }}\">
<span class=\"hidden md:inline-block\">{{ product.name }}</span> <span class=\"text-blue\">{{ product.code ?? \"\" }}</span>
</a>
</td>
{#
then we will loop through all the selected properties...
We always render a column for each selected property, we do this to maintain table-like
formatting. In case a selected spec to highlight does not exist in a product
we will simply show an empty column for that product :)
#}
{% set customCounter = 0 %}
{% for property in selectedProperties ?: [] %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<td class=\"px-4 py-4 leading-4 lg:px-6 lg:py-4 whitespace-nowrap {{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</td>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
{% if not found %}
{% set customCounter = customCounter + 1 %}
<td class=\"{{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
<!-- empty -->
</td>
{% endif %}
{% endfor %}
<td class=\"hidden px-4 py-2 lg:px-6 lg:py-4 lg:table-cell lg:rounded-r-md\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url
} %}
</td>
<td class=\"content-end px-4 py-2 text-right md:hidden lg:px-6 lg:py-4 group \">
<div
class=\"inline-flex items-center justify-center w-8 h-8 bg-gray-200 rounded-full cursor-pointer text-blue group-hover:bg-blue group-hover:text-white lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? '-rotate-90' : 'rotate-90'\"
@click=\"(rowOpen == {{loop.index}}) ? rowOpen = false : rowOpen = {{loop.index}}\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"16\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"/></svg>
</div>
</td>
</tr>
<tr
class=\"bg-white border-2 rounded-md lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? 'table-row' : 'hidden'\"
>
<td colspan=\"4\" class=\"px-4 pt-6 pb-6 text-sm\">
{% for property in selectedProperties ?: [] %}
{% if loop.index > 2 %}
<div class=\"flex justify-between py-1\">
<span>{{ property.title ?: property.key }}</span>
<span class=\"text-right text-blue\">
{% set customCounter = 0 %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<div class=\" {{ customCounter > 2 ? '' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</div>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
</span>
</div>
{% endif %}
{% endfor %}
<div class=\"lg:py-1.5 hidden lg:flex lg:justify-between \">
<span>{{ 'Meer informatie'|trans }}</span>
<span class=\"relative text-right text-blue\" x-data=\"{ tooltipOpen: false }\">
<span
class=\"cursor-pointer\"
@click=\"tooltipOpen = !tooltipOpen\"
@click.outside=\"tooltipOpen = false\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#0072BB\" fill-rule=\"evenodd\" d=\"M8.036 5.235c.433 0 .747-.081.942-.244.196-.162.294-.418.294-.767 0-.358-.098-.618-.294-.78-.195-.163-.51-.244-.942-.244-.433 0-.747.081-.943.243-.195.163-.293.423-.293.78 0 .35.098.606.293.768.196.163.51.244.943.244Zm1.06 6.965V5.959H6.976V12.2h2.122ZM8 14.4A6.4 6.4 0 1 1 14.4 8 6.407 6.407 0 0 1 8 14.4ZM0 8a8 8 0 0 0 16 0 8.009 8.009 0 0 0-8-8 8 8 0 0 0-8 8Z\"/></svg>
</span>
<div
class=\"absolute right-0 z-10 w-64 p-4 bg-white rounded shadow-lg top-5\"
:class=\"tooltipOpen ? 'block' : 'hidden'\"
>
<span class=\"text-sm leading-6 text-gray-900\">
{{ \"Onze specialisten zorgen voor een passende oplossing, vrijblijvend advies en afstemming met u.\"|trans }}
</span>
</div>
</span>
</div>
<div class=\"mt-4\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url ?? null
} %}
<a href=\"{{ product.page.url | trimUrl }}\" class=\"items-center justify-center !hidden lg:flex button button__secondary\">
Meer informatie
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg class=\"h-3.5 w-3.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">
<path fill=\"currentColor\" fill-rule=\"currentColor\" d=\"m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"></path>
</svg>
</span>
</a>
</div>
</td>
</tr>
{% set showReadMoreSpecsButton = loop.index > shownSpecsOnInitialLoad %}
{% endfor %}
</tbody>
</table>
</div>
{# never show this button when printing (printmode), even though there could be more specs. #}
{% if showReadMoreSpecsButton and printmode is not defined %}
<div class=\"flex justify-center w-full mt-6 \">
<button
class=\"button button__secondary group\"
@click=\"tableOpen = !tableOpen\"
>
<span class=\"flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white \">
<span class=\"flex items-center justify-center w-full h-full \">
<svg
x-show=\"!tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</span>
<span x-show=\"!tableOpen\">
{{ ('Meer {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
<span x-show=\"tableOpen\">
{{ ('Minder {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
</button>
</div>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}
{% endembed %}
", "areas/product-table-brick/view.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-table-brick/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 1, "embed" => 4];
static $filters = [];
static $functions = ["pimcore_relations" => 1];
try {
$this->sandbox->checkSecurity(
['set', 'embed'],
[],
['pimcore_relations'],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}
/* areas/product-table-brick/view.html.twig */
class __TwigTemplate_964436efdd695f14360fa08b2cf3902c17d3be5f381a4f2428e00f84021e5a25___1481781932 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
return "app/area-brick-layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$this->parent = $this->loadTemplate("app/area-brick-layout.html.twig", "areas/product-table-brick/view.html.twig", 4);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 6
yield "
";
// line 7
if (Twig\Extension\CoreExtension::testEmpty((isset($context["selectedProducts"]) || array_key_exists("selectedProducts", $context) ? $context["selectedProducts"] : (function () { throw new RuntimeError('Variable "selectedProducts" does not exist.', 7, $this->source); })()))) {
// line 8
yield " ";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 8, $this->source); })())) {
// line 9
yield " ";
yield from $this->loadTemplate("areas/product-table-brick/view.html.twig", "areas/product-table-brick/view.html.twig", 9, "2130027015")->unwrap()->yield($context);
// line 13
yield " ";
}
// line 14
yield " ";
} else {
// line 15
yield " <section class=\"py-10 bg-blue-200 lg:py-20\" x-data=\"{ tableOpen: false }\">
<div class=\"overflow-hidden lg:container\">
";
// line 18
if (((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 18, $this->source); })()) && Twig\Extension\CoreExtension::testEmpty((isset($context["selectedProperties"]) || array_key_exists("selectedProperties", $context) ? $context["selectedProperties"] : (function () { throw new RuntimeError('Variable "selectedProperties" does not exist.', 18, $this->source); })())))) {
// line 19
yield " ";
yield from $this->loadTemplate("areas/product-table-brick/view.html.twig", "areas/product-table-brick/view.html.twig", 19, "1488321402")->unwrap()->yield($context);
// line 23
yield " ";
}
// line 24
yield "
<div class=\"grid grid-cols-12 gap-6\">
<div class=\"col-span-12\">
<h2 class=\"mb-4 text-2xl text-center md:text-3xl lg:text-4xl\">
";
// line 28
yield from $this->loadTemplate("areas/unique-selling-point-brick/partials/_title.html.twig", "areas/product-table-brick/view.html.twig", 28)->unwrap()->yield($context);
// line 29
yield " </h2>
</div>
</div>
";
// line 37
yield " ";
$context["shownSpecsOnInitialLoad"] = 8;
// line 38
yield " ";
$context["showReadMoreSpecsButton"] = false;
// line 39
yield "
<div class=\"px-0 overflow-x-auto lg:pb-6 lg:pr-6 \">
<table class=\"w-full lg:border-separate text-md lg:text-base lg:border-slate-500 lg:border-spacing-2\" >
";
// line 43
yield " <thead class=\"bg-gray-50\">
<tr>
<th>
<!-- title -->
</th>
";
// line 48
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((((isset($context["selectedProperties"]) || array_key_exists("selectedProperties", $context) ? $context["selectedProperties"] : (function () { throw new RuntimeError('Variable "selectedProperties" does not exist.', 48, $this->source); })())) ? ($context["selectedProperties"]) : ([])));
$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["property"]) {
// line 49
yield " <th scope=\"col\" class=\"px-4 py-2 font-normal text-left text-gray-900 lg:px-6 lg:py-4 ";
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 49) > 2)) ? ("hidden lg:table-cell") : (""));
yield "\">
";
// line 50
yield ((CoreExtension::getAttribute($this->env, $this->source, $context["property"], "title", [], "any", false, false, true, 50)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["property"], "title", [], "any", false, false, true, 50), 50, $this->source), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["property"], "key", [], "any", false, false, true, 50), 50, $this->source), "html", null, true)));
yield "
</th>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
yield " <th class=\"hidden lg:table-cell\">
<!-- info -->
</th>
<th class=\"hidden lg:table-cell\">
<!-- button -->
</th>
<th>
<!-- chevron -->
</th>
</tr>
</thead>
";
// line 66
yield " <tbody class=\"gap-6\" x-data=\"{ rowOpen: false }\">
";
// line 67
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["selectedProducts"]) || array_key_exists("selectedProducts", $context) ? $context["selectedProducts"] : (function () { throw new RuntimeError('Variable "selectedProducts" does not exist.', 67, $this->source); })()));
$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["product"]) {
// line 68
yield " <tr
x-description=\"Odd row\"
class=\"bg-white border-t-8 border-blue-200 lg:border-t-0\"
";
// line 71
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 71) >= (isset($context["shownSpecsOnInitialLoad"]) || array_key_exists("shownSpecsOnInitialLoad", $context) ? $context["shownSpecsOnInitialLoad"] : (function () { throw new RuntimeError('Variable "shownSpecsOnInitialLoad" does not exist.', 71, $this->source); })()))) {
// line 72
yield " :class=\"tableOpen ? '' : 'hidden'\"
";
}
// line 74
yield " >
";
// line 76
yield " <td class=\"px-4 py-5 mb-4 font-bold leading-4 text-md lg:text-xl lg:px-6 lg:py-4 lg:rounded-l-md whitespace-nowrap\">
<a href=\"";
// line 77
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\UrlExtension']->trimUrl($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "page", [], "any", false, false, true, 77), "url", [], "any", false, false, true, 77), 77, $this->source)), "html", null, true);
yield "\">
<span class=\"hidden md:inline-block\">";
// line 78
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, true, 78), 78, $this->source), "html", null, true);
yield "</span> <span class=\"text-blue\">";
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["product"], "code", [], "any", true, true, true, 78) && !(null === CoreExtension::getAttribute($this->env, $this->source, $context["product"], "code", [], "any", false, false, true, 78)))) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "code", [], "any", false, false, true, 78), 78, $this->source), "html", null, true)) : (""));
yield "</span>
</a>
</td>
";
// line 87
yield " ";
$context["customCounter"] = 0;
// line 88
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((((isset($context["selectedProperties"]) || array_key_exists("selectedProperties", $context) ? $context["selectedProperties"] : (function () { throw new RuntimeError('Variable "selectedProperties" does not exist.', 88, $this->source); })())) ? ($context["selectedProperties"]) : ([])));
foreach ($context['_seq'] as $context["_key"] => $context["property"]) {
// line 89
yield " ";
$context["found"] = false;
// line 90
yield "
";
// line 91
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::filter($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "specifications", [], "any", false, false, true, 91), function ($__s__) use ($context, $macros) { $context["s"] = $__s__; return CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["s"]) || array_key_exists("s", $context) ? $context["s"] : (function () { throw new RuntimeError('Variable "s" does not exist.', 91, $this->source); })()), "specification_property", [], "any", false, false, true, 91), "data", [], "any", false, false, true, 91), "publicly_visible", [], "any", false, false, true, 91); }));
foreach ($context['_seq'] as $context["_key"] => $context["spec"]) {
// line 92
yield " ";
$context["specificationObject"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["spec"], "specification_property", [], "any", false, false, true, 92), "data", [], "any", false, false, true, 92);
// line 93
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["specificationObject"]) || array_key_exists("specificationObject", $context) ? $context["specificationObject"] : (function () { throw new RuntimeError('Variable "specificationObject" does not exist.', 93, $this->source); })()), "id", [], "any", false, false, true, 93) == CoreExtension::getAttribute($this->env, $this->source, $context["property"], "id", [], "any", false, false, true, 93))) {
// line 94
yield " ";
$context["found"] = true;
// line 95
yield " ";
$context["customCounter"] = ((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 95, $this->source); })()) + 1);
// line 96
yield " ";
// line 97
yield " <td class=\"px-4 py-4 leading-4 lg:px-6 lg:py-4 whitespace-nowrap ";
yield ((((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 97, $this->source); })()) > 2)) ? ("hidden lg:table-cell") : (""));
yield "\">
";
// line 98
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["spec"], "specification_value", [], "any", false, false, true, 98), "data", [], "any", false, false, true, 98), 98, $this->source), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["specificationObject"]) || array_key_exists("specificationObject", $context) ? $context["specificationObject"] : (function () { throw new RuntimeError('Variable "specificationObject" does not exist.', 98, $this->source); })()), "unit", [], "any", false, false, true, 98), 98, $this->source), "html", null, true);
yield "
</td>
";
// line 101
yield " ";
break 1;
// line 102
yield " ";
}
// line 103
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['spec'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 104
yield " ";
if ( !(isset($context["found"]) || array_key_exists("found", $context) ? $context["found"] : (function () { throw new RuntimeError('Variable "found" does not exist.', 104, $this->source); })())) {
// line 105
yield " ";
$context["customCounter"] = ((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 105, $this->source); })()) + 1);
// line 106
yield " <td class=\"";
yield ((((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 106, $this->source); })()) > 2)) ? ("hidden lg:table-cell") : (""));
yield "\">
<!-- empty -->
</td>
";
}
// line 110
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['property'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 111
yield "
<td class=\"hidden px-4 py-2 lg:px-6 lg:py-4 lg:table-cell lg:rounded-r-md\">
";
// line 113
yield from $this->loadTemplate("includes/partials/_rental-form.html.twig", "areas/product-table-brick/view.html.twig", 113)->unwrap()->yield(CoreExtension::merge($context, ["buttonText" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Offerte aanvragen"), "buttonClass" => "button button__green", "trackButtonId" => "conversion_rentnow", "requestUrl" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 117
(isset($context["data"]) || array_key_exists("data", $context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.', 117, $this->source); })()), "request", [], "any", false, false, true, 117), "url", [], "any", false, false, true, 117)]));
// line 119
yield " </td>
<td class=\"content-end px-4 py-2 text-right md:hidden lg:px-6 lg:py-4 group \">
<div
class=\"inline-flex items-center justify-center w-8 h-8 bg-gray-200 rounded-full cursor-pointer text-blue group-hover:bg-blue group-hover:text-white lg:hidden\"
:class=\"(rowOpen == ";
// line 123
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 123), 123, $this->source), "html", null, true);
yield ") ? '-rotate-90' : 'rotate-90'\"
@click=\"(rowOpen == ";
// line 124
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 124), 124, $this->source), "html", null, true);
yield ") ? rowOpen = false : rowOpen = ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 124), 124, $this->source), "html", null, true);
yield "\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"16\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"/></svg>
</div>
</td>
</tr>
<tr
class=\"bg-white border-2 rounded-md lg:hidden\"
:class=\"(rowOpen == ";
// line 132
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 132), 132, $this->source), "html", null, true);
yield ") ? 'table-row' : 'hidden'\"
>
<td colspan=\"4\" class=\"px-4 pt-6 pb-6 text-sm\">
";
// line 135
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((((isset($context["selectedProperties"]) || array_key_exists("selectedProperties", $context) ? $context["selectedProperties"] : (function () { throw new RuntimeError('Variable "selectedProperties" does not exist.', 135, $this->source); })())) ? ($context["selectedProperties"]) : ([])));
$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["property"]) {
// line 136
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 136) > 2)) {
// line 137
yield " <div class=\"flex justify-between py-1\">
<span>";
// line 138
yield ((CoreExtension::getAttribute($this->env, $this->source, $context["property"], "title", [], "any", false, false, true, 138)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["property"], "title", [], "any", false, false, true, 138), 138, $this->source), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["property"], "key", [], "any", false, false, true, 138), 138, $this->source), "html", null, true)));
yield "</span>
<span class=\"text-right text-blue\">
";
// line 140
$context["customCounter"] = 0;
// line 141
yield " ";
$context["found"] = false;
// line 142
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::filter($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "specifications", [], "any", false, false, true, 142), function ($__s__) use ($context, $macros) { $context["s"] = $__s__; return CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["s"]) || array_key_exists("s", $context) ? $context["s"] : (function () { throw new RuntimeError('Variable "s" does not exist.', 142, $this->source); })()), "specification_property", [], "any", false, false, true, 142), "data", [], "any", false, false, true, 142), "publicly_visible", [], "any", false, false, true, 142); }));
foreach ($context['_seq'] as $context["_key"] => $context["spec"]) {
// line 143
yield " ";
$context["specificationObject"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["spec"], "specification_property", [], "any", false, false, true, 143), "data", [], "any", false, false, true, 143);
// line 144
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["specificationObject"]) || array_key_exists("specificationObject", $context) ? $context["specificationObject"] : (function () { throw new RuntimeError('Variable "specificationObject" does not exist.', 144, $this->source); })()), "id", [], "any", false, false, true, 144) == CoreExtension::getAttribute($this->env, $this->source, $context["property"], "id", [], "any", false, false, true, 144))) {
// line 145
yield " ";
$context["found"] = true;
// line 146
yield " ";
$context["customCounter"] = ((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 146, $this->source); })()) + 1);
// line 147
yield " ";
// line 148
yield " <div class=\" ";
yield ((((isset($context["customCounter"]) || array_key_exists("customCounter", $context) ? $context["customCounter"] : (function () { throw new RuntimeError('Variable "customCounter" does not exist.', 148, $this->source); })()) > 2)) ? ("") : (""));
yield "\">
";
// line 149
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["spec"], "specification_value", [], "any", false, false, true, 149), "data", [], "any", false, false, true, 149), 149, $this->source), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["specificationObject"]) || array_key_exists("specificationObject", $context) ? $context["specificationObject"] : (function () { throw new RuntimeError('Variable "specificationObject" does not exist.', 149, $this->source); })()), "unit", [], "any", false, false, true, 149), 149, $this->source), "html", null, true);
yield "
</div>
";
// line 152
yield " ";
break 1;
// line 153
yield " ";
}
// line 154
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['spec'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 155
yield " </span>
</div>
";
}
// line 158
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['property'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 159
yield "
<div class=\"lg:py-1.5 hidden lg:flex lg:justify-between \">
<span>";
// line 161
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Meer informatie"), "html", null, true);
yield "</span>
<span class=\"relative text-right text-blue\" x-data=\"{ tooltipOpen: false }\">
<span
class=\"cursor-pointer\"
@click=\"tooltipOpen = !tooltipOpen\"
@click.outside=\"tooltipOpen = false\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#0072BB\" fill-rule=\"evenodd\" d=\"M8.036 5.235c.433 0 .747-.081.942-.244.196-.162.294-.418.294-.767 0-.358-.098-.618-.294-.78-.195-.163-.51-.244-.942-.244-.433 0-.747.081-.943.243-.195.163-.293.423-.293.78 0 .35.098.606.293.768.196.163.51.244.943.244Zm1.06 6.965V5.959H6.976V12.2h2.122ZM8 14.4A6.4 6.4 0 1 1 14.4 8 6.407 6.407 0 0 1 8 14.4ZM0 8a8 8 0 0 0 16 0 8.009 8.009 0 0 0-8-8 8 8 0 0 0-8 8Z\"/></svg>
</span>
<div
class=\"absolute right-0 z-10 w-64 p-4 bg-white rounded shadow-lg top-5\"
:class=\"tooltipOpen ? 'block' : 'hidden'\"
>
<span class=\"text-sm leading-6 text-gray-900\">
";
// line 175
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Onze specialisten zorgen voor een passende oplossing, vrijblijvend advies en afstemming met u."), "html", null, true);
yield "
</span>
</div>
</span>
</div>
<div class=\"mt-4\">
";
// line 182
yield from $this->loadTemplate("includes/partials/_rental-form.html.twig", "areas/product-table-brick/view.html.twig", 182)->unwrap()->yield(CoreExtension::merge($context, ["buttonText" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Offerte aanvragen"), "buttonClass" => "button button__green", "trackButtonId" => "conversion_rentnow", "requestUrl" => (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 186
($context["data"] ?? null), "request", [], "any", false, true, true, 186), "url", [], "any", true, true, true, 186) && !(null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["data"] ?? null), "request", [], "any", false, true, true, 186), "url", [], "any", false, false, true, 186)))) ? (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["data"] ?? null), "request", [], "any", false, true, true, 186), "url", [], "any", false, false, true, 186)) : (null))]));
// line 188
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\UrlExtension']->trimUrl($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "page", [], "any", false, false, true, 188), "url", [], "any", false, false, true, 188), 188, $this->source)), "html", null, true);
yield "\" class=\"items-center justify-center !hidden lg:flex button button__secondary\">
Meer informatie
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg class=\"h-3.5 w-3.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">
<path fill=\"currentColor\" fill-rule=\"currentColor\" d=\"m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"></path>
</svg>
</span>
</a>
</div>
</td>
</tr>
";
// line 201
$context["showReadMoreSpecsButton"] = (CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 201) > (isset($context["shownSpecsOnInitialLoad"]) || array_key_exists("shownSpecsOnInitialLoad", $context) ? $context["shownSpecsOnInitialLoad"] : (function () { throw new RuntimeError('Variable "shownSpecsOnInitialLoad" does not exist.', 201, $this->source); })()));
// line 202
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 203
yield " </tbody>
</table>
</div>
";
// line 209
yield " ";
if (((isset($context["showReadMoreSpecsButton"]) || array_key_exists("showReadMoreSpecsButton", $context) ? $context["showReadMoreSpecsButton"] : (function () { throw new RuntimeError('Variable "showReadMoreSpecsButton" does not exist.', 209, $this->source); })()) && !array_key_exists("printmode", $context))) {
// line 210
yield " <div class=\"flex justify-center w-full mt-6 \">
<button
class=\"button button__secondary group\"
@click=\"tableOpen = !tableOpen\"
>
<span class=\"flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white \">
<span class=\"flex items-center justify-center w-full h-full \">
<svg
x-show=\"!tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</span>
<span x-show=\"!tableOpen\">
";
// line 230
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Meer {{ productCategory }} tonen", ["{{ productCategory }}" => $this->extensions['App\Twig\CustomLowercaseExtension']->customLowercase(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 230, $this->source); })()), "name", [], "any", false, false, true, 230)) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 230, $this->source); })()), "name", [], "any", false, false, true, 230)) : (CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 230, $this->source); })()), "key", [], "any", false, false, true, 230))))]), "html", null, true);
yield "
</span>
<span x-show=\"tableOpen\">
";
// line 233
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Minder {{ productCategory }} tonen", ["{{ productCategory }}" => $this->extensions['App\Twig\CustomLowercaseExtension']->customLowercase(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 233, $this->source); })()), "name", [], "any", false, false, true, 233)) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 233, $this->source); })()), "name", [], "any", false, false, true, 233)) : (CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 233, $this->source); })()), "key", [], "any", false, false, true, 233))))]), "html", null, true);
yield "
</span>
</button>
</div>
";
}
// line 238
yield "
</div>
</section>
";
}
// line 242
yield "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-table-brick/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 922 => 242, 916 => 238, 908 => 233, 902 => 230, 880 => 210, 877 => 209, 870 => 203, 856 => 202, 854 => 201, 837 => 188, 835 => 186, 834 => 182, 824 => 175, 807 => 161, 803 => 159, 789 => 158, 784 => 155, 778 => 154, 775 => 153, 772 => 152, 765 => 149, 760 => 148, 758 => 147, 755 => 146, 752 => 145, 749 => 144, 746 => 143, 741 => 142, 738 => 141, 736 => 140, 731 => 138, 728 => 137, 725 => 136, 708 => 135, 702 => 132, 689 => 124, 685 => 123, 679 => 119, 677 => 117, 676 => 113, 672 => 111, 666 => 110, 658 => 106, 655 => 105, 652 => 104, 646 => 103, 643 => 102, 640 => 101, 633 => 98, 628 => 97, 626 => 96, 623 => 95, 620 => 94, 617 => 93, 614 => 92, 610 => 91, 607 => 90, 604 => 89, 599 => 88, 596 => 87, 588 => 78, 584 => 77, 581 => 76, 578 => 74, 574 => 72, 572 => 71, 567 => 68, 550 => 67, 547 => 66, 533 => 53, 516 => 50, 511 => 49, 494 => 48, 487 => 43, 482 => 39, 479 => 38, 476 => 37, 470 => 29, 468 => 28, 462 => 24, 459 => 23, 456 => 19, 454 => 18, 449 => 15, 446 => 14, 443 => 13, 440 => 9, 437 => 8, 435 => 7, 432 => 6, 419 => 5, 57 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set selectedProducts = pimcore_relations('selectedProducts').getData() %}
{% set selectedProperties = pimcore_relations('selectedProperties').getData() %}
{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
{% if selectedProducts is empty %}
{% if editmode %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen alternatieve producten geselecteerd. {% endblock %}
{% block information %} Kies alternatieve producten middels het potloodje. {% endblock %}
{% endembed %}
{% endif %}
{% else %}
<section class=\"py-10 bg-blue-200 lg:py-20\" x-data=\"{ tableOpen: false }\">
<div class=\"overflow-hidden lg:container\">
{% if editmode and selectedProperties is empty %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen producteneigenschappen geselecteerd. {% endblock %}
{% block information %} Kies producteneigenschappen middels het potloodje {% endblock %}
{% endembed %}
{% endif %}
<div class=\"grid grid-cols-12 gap-6\">
<div class=\"col-span-12\">
<h2 class=\"mb-4 text-2xl text-center md:text-3xl lg:text-4xl\">
{% include 'areas/unique-selling-point-brick/partials/_title.html.twig' %}
</h2>
</div>
</div>
{#
Here we set the maxinum amount of specs that are shown on initial page load.
If there are more then this amount then those will be hidden, a button will then be shown
#}
{% set shownSpecsOnInitialLoad = 8 %}
{% set showReadMoreSpecsButton = false %}
<div class=\"px-0 overflow-x-auto lg:pb-6 lg:pr-6 \">
<table class=\"w-full lg:border-separate text-md lg:text-base lg:border-slate-500 lg:border-spacing-2\" >
{# First, we generate the table header based on the selected properties. #}
<thead class=\"bg-gray-50\">
<tr>
<th>
<!-- title -->
</th>
{% for property in selectedProperties ?: [] %}
<th scope=\"col\" class=\"px-4 py-2 font-normal text-left text-gray-900 lg:px-6 lg:py-4 {{ loop.index > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ property.title ?: property.key }}
</th>
{% endfor %}
<th class=\"hidden lg:table-cell\">
<!-- info -->
</th>
<th class=\"hidden lg:table-cell\">
<!-- button -->
</th>
<th>
<!-- chevron -->
</th>
</tr>
</thead>
{# then, we will output the product-rows #}
<tbody class=\"gap-6\" x-data=\"{ rowOpen: false }\">
{% for product in selectedProducts %}
<tr
x-description=\"Odd row\"
class=\"bg-white border-t-8 border-blue-200 lg:border-t-0\"
{% if loop.index >= shownSpecsOnInitialLoad %}
:class=\"tableOpen ? '' : 'hidden'\"
{% endif %}
>
{# Output the product title as the first column in this row #}
<td class=\"px-4 py-5 mb-4 font-bold leading-4 text-md lg:text-xl lg:px-6 lg:py-4 lg:rounded-l-md whitespace-nowrap\">
<a href=\"{{ product.page.url | trimUrl }}\">
<span class=\"hidden md:inline-block\">{{ product.name }}</span> <span class=\"text-blue\">{{ product.code ?? \"\" }}</span>
</a>
</td>
{#
then we will loop through all the selected properties...
We always render a column for each selected property, we do this to maintain table-like
formatting. In case a selected spec to highlight does not exist in a product
we will simply show an empty column for that product :)
#}
{% set customCounter = 0 %}
{% for property in selectedProperties ?: [] %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<td class=\"px-4 py-4 leading-4 lg:px-6 lg:py-4 whitespace-nowrap {{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</td>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
{% if not found %}
{% set customCounter = customCounter + 1 %}
<td class=\"{{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
<!-- empty -->
</td>
{% endif %}
{% endfor %}
<td class=\"hidden px-4 py-2 lg:px-6 lg:py-4 lg:table-cell lg:rounded-r-md\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url
} %}
</td>
<td class=\"content-end px-4 py-2 text-right md:hidden lg:px-6 lg:py-4 group \">
<div
class=\"inline-flex items-center justify-center w-8 h-8 bg-gray-200 rounded-full cursor-pointer text-blue group-hover:bg-blue group-hover:text-white lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? '-rotate-90' : 'rotate-90'\"
@click=\"(rowOpen == {{loop.index}}) ? rowOpen = false : rowOpen = {{loop.index}}\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"16\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"/></svg>
</div>
</td>
</tr>
<tr
class=\"bg-white border-2 rounded-md lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? 'table-row' : 'hidden'\"
>
<td colspan=\"4\" class=\"px-4 pt-6 pb-6 text-sm\">
{% for property in selectedProperties ?: [] %}
{% if loop.index > 2 %}
<div class=\"flex justify-between py-1\">
<span>{{ property.title ?: property.key }}</span>
<span class=\"text-right text-blue\">
{% set customCounter = 0 %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<div class=\" {{ customCounter > 2 ? '' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</div>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
</span>
</div>
{% endif %}
{% endfor %}
<div class=\"lg:py-1.5 hidden lg:flex lg:justify-between \">
<span>{{ 'Meer informatie'|trans }}</span>
<span class=\"relative text-right text-blue\" x-data=\"{ tooltipOpen: false }\">
<span
class=\"cursor-pointer\"
@click=\"tooltipOpen = !tooltipOpen\"
@click.outside=\"tooltipOpen = false\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#0072BB\" fill-rule=\"evenodd\" d=\"M8.036 5.235c.433 0 .747-.081.942-.244.196-.162.294-.418.294-.767 0-.358-.098-.618-.294-.78-.195-.163-.51-.244-.942-.244-.433 0-.747.081-.943.243-.195.163-.293.423-.293.78 0 .35.098.606.293.768.196.163.51.244.943.244Zm1.06 6.965V5.959H6.976V12.2h2.122ZM8 14.4A6.4 6.4 0 1 1 14.4 8 6.407 6.407 0 0 1 8 14.4ZM0 8a8 8 0 0 0 16 0 8.009 8.009 0 0 0-8-8 8 8 0 0 0-8 8Z\"/></svg>
</span>
<div
class=\"absolute right-0 z-10 w-64 p-4 bg-white rounded shadow-lg top-5\"
:class=\"tooltipOpen ? 'block' : 'hidden'\"
>
<span class=\"text-sm leading-6 text-gray-900\">
{{ \"Onze specialisten zorgen voor een passende oplossing, vrijblijvend advies en afstemming met u.\"|trans }}
</span>
</div>
</span>
</div>
<div class=\"mt-4\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url ?? null
} %}
<a href=\"{{ product.page.url | trimUrl }}\" class=\"items-center justify-center !hidden lg:flex button button__secondary\">
Meer informatie
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg class=\"h-3.5 w-3.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">
<path fill=\"currentColor\" fill-rule=\"currentColor\" d=\"m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"></path>
</svg>
</span>
</a>
</div>
</td>
</tr>
{% set showReadMoreSpecsButton = loop.index > shownSpecsOnInitialLoad %}
{% endfor %}
</tbody>
</table>
</div>
{# never show this button when printing (printmode), even though there could be more specs. #}
{% if showReadMoreSpecsButton and printmode is not defined %}
<div class=\"flex justify-center w-full mt-6 \">
<button
class=\"button button__secondary group\"
@click=\"tableOpen = !tableOpen\"
>
<span class=\"flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white \">
<span class=\"flex items-center justify-center w-full h-full \">
<svg
x-show=\"!tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</span>
<span x-show=\"!tableOpen\">
{{ ('Meer {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
<span x-show=\"tableOpen\">
{{ ('Minder {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
</button>
</div>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}
{% endembed %}
", "areas/product-table-brick/view.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-table-brick/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["extends" => 4, "if" => 7, "embed" => 9, "include" => 28, "set" => 37, "for" => 48, "break" => 101];
static $filters = ["escape" => 50, "trimUrl" => 77, "filter" => 91, "trans" => 114, "customLowercase" => 230];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['extends', 'if', 'embed', 'include', 'set', 'for', 'break'],
['escape', 'trimUrl', 'filter', 'trans', 'customLowercase'],
[],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}
/* areas/product-table-brick/view.html.twig */
class __TwigTemplate_964436efdd695f14360fa08b2cf3902c17d3be5f381a4f2428e00f84021e5a25___2130027015 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'information' => [$this, 'block_information'],
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 9
return "app/editmodenotice.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$this->parent = $this->loadTemplate("app/editmodenotice.html.twig", "areas/product-table-brick/view.html.twig", 9);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 10
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield " Nog geen alternatieve producten geselecteerd. ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
// line 11
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_information(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "information"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "information"));
yield " Kies alternatieve producten middels het potloodje. ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-table-brick/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1311 => 11, 1288 => 10, 1265 => 9, 922 => 242, 916 => 238, 908 => 233, 902 => 230, 880 => 210, 877 => 209, 870 => 203, 856 => 202, 854 => 201, 837 => 188, 835 => 186, 834 => 182, 824 => 175, 807 => 161, 803 => 159, 789 => 158, 784 => 155, 778 => 154, 775 => 153, 772 => 152, 765 => 149, 760 => 148, 758 => 147, 755 => 146, 752 => 145, 749 => 144, 746 => 143, 741 => 142, 738 => 141, 736 => 140, 731 => 138, 728 => 137, 725 => 136, 708 => 135, 702 => 132, 689 => 124, 685 => 123, 679 => 119, 677 => 117, 676 => 113, 672 => 111, 666 => 110, 658 => 106, 655 => 105, 652 => 104, 646 => 103, 643 => 102, 640 => 101, 633 => 98, 628 => 97, 626 => 96, 623 => 95, 620 => 94, 617 => 93, 614 => 92, 610 => 91, 607 => 90, 604 => 89, 599 => 88, 596 => 87, 588 => 78, 584 => 77, 581 => 76, 578 => 74, 574 => 72, 572 => 71, 567 => 68, 550 => 67, 547 => 66, 533 => 53, 516 => 50, 511 => 49, 494 => 48, 487 => 43, 482 => 39, 479 => 38, 476 => 37, 470 => 29, 468 => 28, 462 => 24, 459 => 23, 456 => 19, 454 => 18, 449 => 15, 446 => 14, 443 => 13, 440 => 9, 437 => 8, 435 => 7, 432 => 6, 419 => 5, 57 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set selectedProducts = pimcore_relations('selectedProducts').getData() %}
{% set selectedProperties = pimcore_relations('selectedProperties').getData() %}
{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
{% if selectedProducts is empty %}
{% if editmode %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen alternatieve producten geselecteerd. {% endblock %}
{% block information %} Kies alternatieve producten middels het potloodje. {% endblock %}
{% endembed %}
{% endif %}
{% else %}
<section class=\"py-10 bg-blue-200 lg:py-20\" x-data=\"{ tableOpen: false }\">
<div class=\"overflow-hidden lg:container\">
{% if editmode and selectedProperties is empty %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen producteneigenschappen geselecteerd. {% endblock %}
{% block information %} Kies producteneigenschappen middels het potloodje {% endblock %}
{% endembed %}
{% endif %}
<div class=\"grid grid-cols-12 gap-6\">
<div class=\"col-span-12\">
<h2 class=\"mb-4 text-2xl text-center md:text-3xl lg:text-4xl\">
{% include 'areas/unique-selling-point-brick/partials/_title.html.twig' %}
</h2>
</div>
</div>
{#
Here we set the maxinum amount of specs that are shown on initial page load.
If there are more then this amount then those will be hidden, a button will then be shown
#}
{% set shownSpecsOnInitialLoad = 8 %}
{% set showReadMoreSpecsButton = false %}
<div class=\"px-0 overflow-x-auto lg:pb-6 lg:pr-6 \">
<table class=\"w-full lg:border-separate text-md lg:text-base lg:border-slate-500 lg:border-spacing-2\" >
{# First, we generate the table header based on the selected properties. #}
<thead class=\"bg-gray-50\">
<tr>
<th>
<!-- title -->
</th>
{% for property in selectedProperties ?: [] %}
<th scope=\"col\" class=\"px-4 py-2 font-normal text-left text-gray-900 lg:px-6 lg:py-4 {{ loop.index > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ property.title ?: property.key }}
</th>
{% endfor %}
<th class=\"hidden lg:table-cell\">
<!-- info -->
</th>
<th class=\"hidden lg:table-cell\">
<!-- button -->
</th>
<th>
<!-- chevron -->
</th>
</tr>
</thead>
{# then, we will output the product-rows #}
<tbody class=\"gap-6\" x-data=\"{ rowOpen: false }\">
{% for product in selectedProducts %}
<tr
x-description=\"Odd row\"
class=\"bg-white border-t-8 border-blue-200 lg:border-t-0\"
{% if loop.index >= shownSpecsOnInitialLoad %}
:class=\"tableOpen ? '' : 'hidden'\"
{% endif %}
>
{# Output the product title as the first column in this row #}
<td class=\"px-4 py-5 mb-4 font-bold leading-4 text-md lg:text-xl lg:px-6 lg:py-4 lg:rounded-l-md whitespace-nowrap\">
<a href=\"{{ product.page.url | trimUrl }}\">
<span class=\"hidden md:inline-block\">{{ product.name }}</span> <span class=\"text-blue\">{{ product.code ?? \"\" }}</span>
</a>
</td>
{#
then we will loop through all the selected properties...
We always render a column for each selected property, we do this to maintain table-like
formatting. In case a selected spec to highlight does not exist in a product
we will simply show an empty column for that product :)
#}
{% set customCounter = 0 %}
{% for property in selectedProperties ?: [] %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<td class=\"px-4 py-4 leading-4 lg:px-6 lg:py-4 whitespace-nowrap {{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</td>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
{% if not found %}
{% set customCounter = customCounter + 1 %}
<td class=\"{{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
<!-- empty -->
</td>
{% endif %}
{% endfor %}
<td class=\"hidden px-4 py-2 lg:px-6 lg:py-4 lg:table-cell lg:rounded-r-md\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url
} %}
</td>
<td class=\"content-end px-4 py-2 text-right md:hidden lg:px-6 lg:py-4 group \">
<div
class=\"inline-flex items-center justify-center w-8 h-8 bg-gray-200 rounded-full cursor-pointer text-blue group-hover:bg-blue group-hover:text-white lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? '-rotate-90' : 'rotate-90'\"
@click=\"(rowOpen == {{loop.index}}) ? rowOpen = false : rowOpen = {{loop.index}}\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"16\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"/></svg>
</div>
</td>
</tr>
<tr
class=\"bg-white border-2 rounded-md lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? 'table-row' : 'hidden'\"
>
<td colspan=\"4\" class=\"px-4 pt-6 pb-6 text-sm\">
{% for property in selectedProperties ?: [] %}
{% if loop.index > 2 %}
<div class=\"flex justify-between py-1\">
<span>{{ property.title ?: property.key }}</span>
<span class=\"text-right text-blue\">
{% set customCounter = 0 %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<div class=\" {{ customCounter > 2 ? '' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</div>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
</span>
</div>
{% endif %}
{% endfor %}
<div class=\"lg:py-1.5 hidden lg:flex lg:justify-between \">
<span>{{ 'Meer informatie'|trans }}</span>
<span class=\"relative text-right text-blue\" x-data=\"{ tooltipOpen: false }\">
<span
class=\"cursor-pointer\"
@click=\"tooltipOpen = !tooltipOpen\"
@click.outside=\"tooltipOpen = false\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#0072BB\" fill-rule=\"evenodd\" d=\"M8.036 5.235c.433 0 .747-.081.942-.244.196-.162.294-.418.294-.767 0-.358-.098-.618-.294-.78-.195-.163-.51-.244-.942-.244-.433 0-.747.081-.943.243-.195.163-.293.423-.293.78 0 .35.098.606.293.768.196.163.51.244.943.244Zm1.06 6.965V5.959H6.976V12.2h2.122ZM8 14.4A6.4 6.4 0 1 1 14.4 8 6.407 6.407 0 0 1 8 14.4ZM0 8a8 8 0 0 0 16 0 8.009 8.009 0 0 0-8-8 8 8 0 0 0-8 8Z\"/></svg>
</span>
<div
class=\"absolute right-0 z-10 w-64 p-4 bg-white rounded shadow-lg top-5\"
:class=\"tooltipOpen ? 'block' : 'hidden'\"
>
<span class=\"text-sm leading-6 text-gray-900\">
{{ \"Onze specialisten zorgen voor een passende oplossing, vrijblijvend advies en afstemming met u.\"|trans }}
</span>
</div>
</span>
</div>
<div class=\"mt-4\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url ?? null
} %}
<a href=\"{{ product.page.url | trimUrl }}\" class=\"items-center justify-center !hidden lg:flex button button__secondary\">
Meer informatie
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg class=\"h-3.5 w-3.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">
<path fill=\"currentColor\" fill-rule=\"currentColor\" d=\"m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"></path>
</svg>
</span>
</a>
</div>
</td>
</tr>
{% set showReadMoreSpecsButton = loop.index > shownSpecsOnInitialLoad %}
{% endfor %}
</tbody>
</table>
</div>
{# never show this button when printing (printmode), even though there could be more specs. #}
{% if showReadMoreSpecsButton and printmode is not defined %}
<div class=\"flex justify-center w-full mt-6 \">
<button
class=\"button button__secondary group\"
@click=\"tableOpen = !tableOpen\"
>
<span class=\"flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white \">
<span class=\"flex items-center justify-center w-full h-full \">
<svg
x-show=\"!tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</span>
<span x-show=\"!tableOpen\">
{{ ('Meer {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
<span x-show=\"tableOpen\">
{{ ('Minder {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
</button>
</div>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}
{% endembed %}
", "areas/product-table-brick/view.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-table-brick/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["extends" => 9];
static $filters = [];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['extends'],
[],
[],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}
/* areas/product-table-brick/view.html.twig */
class __TwigTemplate_964436efdd695f14360fa08b2cf3902c17d3be5f381a4f2428e00f84021e5a25___1488321402 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'information' => [$this, 'block_information'],
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 19
return "app/editmodenotice.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-table-brick/view.html.twig"));
$this->parent = $this->loadTemplate("app/editmodenotice.html.twig", "areas/product-table-brick/view.html.twig", 19);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 20
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield " Nog geen producteneigenschappen geselecteerd. ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
// line 21
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_information(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "information"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "information"));
yield " Kies producteneigenschappen middels het potloodje ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-table-brick/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1710 => 21, 1687 => 20, 1664 => 19, 1311 => 11, 1288 => 10, 1265 => 9, 922 => 242, 916 => 238, 908 => 233, 902 => 230, 880 => 210, 877 => 209, 870 => 203, 856 => 202, 854 => 201, 837 => 188, 835 => 186, 834 => 182, 824 => 175, 807 => 161, 803 => 159, 789 => 158, 784 => 155, 778 => 154, 775 => 153, 772 => 152, 765 => 149, 760 => 148, 758 => 147, 755 => 146, 752 => 145, 749 => 144, 746 => 143, 741 => 142, 738 => 141, 736 => 140, 731 => 138, 728 => 137, 725 => 136, 708 => 135, 702 => 132, 689 => 124, 685 => 123, 679 => 119, 677 => 117, 676 => 113, 672 => 111, 666 => 110, 658 => 106, 655 => 105, 652 => 104, 646 => 103, 643 => 102, 640 => 101, 633 => 98, 628 => 97, 626 => 96, 623 => 95, 620 => 94, 617 => 93, 614 => 92, 610 => 91, 607 => 90, 604 => 89, 599 => 88, 596 => 87, 588 => 78, 584 => 77, 581 => 76, 578 => 74, 574 => 72, 572 => 71, 567 => 68, 550 => 67, 547 => 66, 533 => 53, 516 => 50, 511 => 49, 494 => 48, 487 => 43, 482 => 39, 479 => 38, 476 => 37, 470 => 29, 468 => 28, 462 => 24, 459 => 23, 456 => 19, 454 => 18, 449 => 15, 446 => 14, 443 => 13, 440 => 9, 437 => 8, 435 => 7, 432 => 6, 419 => 5, 57 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set selectedProducts = pimcore_relations('selectedProducts').getData() %}
{% set selectedProperties = pimcore_relations('selectedProperties').getData() %}
{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
{% if selectedProducts is empty %}
{% if editmode %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen alternatieve producten geselecteerd. {% endblock %}
{% block information %} Kies alternatieve producten middels het potloodje. {% endblock %}
{% endembed %}
{% endif %}
{% else %}
<section class=\"py-10 bg-blue-200 lg:py-20\" x-data=\"{ tableOpen: false }\">
<div class=\"overflow-hidden lg:container\">
{% if editmode and selectedProperties is empty %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Nog geen producteneigenschappen geselecteerd. {% endblock %}
{% block information %} Kies producteneigenschappen middels het potloodje {% endblock %}
{% endembed %}
{% endif %}
<div class=\"grid grid-cols-12 gap-6\">
<div class=\"col-span-12\">
<h2 class=\"mb-4 text-2xl text-center md:text-3xl lg:text-4xl\">
{% include 'areas/unique-selling-point-brick/partials/_title.html.twig' %}
</h2>
</div>
</div>
{#
Here we set the maxinum amount of specs that are shown on initial page load.
If there are more then this amount then those will be hidden, a button will then be shown
#}
{% set shownSpecsOnInitialLoad = 8 %}
{% set showReadMoreSpecsButton = false %}
<div class=\"px-0 overflow-x-auto lg:pb-6 lg:pr-6 \">
<table class=\"w-full lg:border-separate text-md lg:text-base lg:border-slate-500 lg:border-spacing-2\" >
{# First, we generate the table header based on the selected properties. #}
<thead class=\"bg-gray-50\">
<tr>
<th>
<!-- title -->
</th>
{% for property in selectedProperties ?: [] %}
<th scope=\"col\" class=\"px-4 py-2 font-normal text-left text-gray-900 lg:px-6 lg:py-4 {{ loop.index > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ property.title ?: property.key }}
</th>
{% endfor %}
<th class=\"hidden lg:table-cell\">
<!-- info -->
</th>
<th class=\"hidden lg:table-cell\">
<!-- button -->
</th>
<th>
<!-- chevron -->
</th>
</tr>
</thead>
{# then, we will output the product-rows #}
<tbody class=\"gap-6\" x-data=\"{ rowOpen: false }\">
{% for product in selectedProducts %}
<tr
x-description=\"Odd row\"
class=\"bg-white border-t-8 border-blue-200 lg:border-t-0\"
{% if loop.index >= shownSpecsOnInitialLoad %}
:class=\"tableOpen ? '' : 'hidden'\"
{% endif %}
>
{# Output the product title as the first column in this row #}
<td class=\"px-4 py-5 mb-4 font-bold leading-4 text-md lg:text-xl lg:px-6 lg:py-4 lg:rounded-l-md whitespace-nowrap\">
<a href=\"{{ product.page.url | trimUrl }}\">
<span class=\"hidden md:inline-block\">{{ product.name }}</span> <span class=\"text-blue\">{{ product.code ?? \"\" }}</span>
</a>
</td>
{#
then we will loop through all the selected properties...
We always render a column for each selected property, we do this to maintain table-like
formatting. In case a selected spec to highlight does not exist in a product
we will simply show an empty column for that product :)
#}
{% set customCounter = 0 %}
{% for property in selectedProperties ?: [] %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<td class=\"px-4 py-4 leading-4 lg:px-6 lg:py-4 whitespace-nowrap {{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</td>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
{% if not found %}
{% set customCounter = customCounter + 1 %}
<td class=\"{{ customCounter > 2 ? 'hidden lg:table-cell' : '' }}\">
<!-- empty -->
</td>
{% endif %}
{% endfor %}
<td class=\"hidden px-4 py-2 lg:px-6 lg:py-4 lg:table-cell lg:rounded-r-md\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url
} %}
</td>
<td class=\"content-end px-4 py-2 text-right md:hidden lg:px-6 lg:py-4 group \">
<div
class=\"inline-flex items-center justify-center w-8 h-8 bg-gray-200 rounded-full cursor-pointer text-blue group-hover:bg-blue group-hover:text-white lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? '-rotate-90' : 'rotate-90'\"
@click=\"(rowOpen == {{loop.index}}) ? rowOpen = false : rowOpen = {{loop.index}}\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"16\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"/></svg>
</div>
</td>
</tr>
<tr
class=\"bg-white border-2 rounded-md lg:hidden\"
:class=\"(rowOpen == {{loop.index}}) ? 'table-row' : 'hidden'\"
>
<td colspan=\"4\" class=\"px-4 pt-6 pb-6 text-sm\">
{% for property in selectedProperties ?: [] %}
{% if loop.index > 2 %}
<div class=\"flex justify-between py-1\">
<span>{{ property.title ?: property.key }}</span>
<span class=\"text-right text-blue\">
{% set customCounter = 0 %}
{% set found = false %}
{% for spec in product.specifications|filter(s => s.specification_property.data.publicly_visible) %}
{% set specificationObject = spec.specification_property.data %}
{% if specificationObject.id == property.id %}
{% set found = true %}
{% set customCounter = customCounter + 1 %}
{# Output the specification value and unit to this row #}
<div class=\" {{ customCounter > 2 ? '' : '' }}\">
{{ spec.specification_value.data }} {{ specificationObject.unit }}
</div>
{# skip the rest of the spec-for-loop when entry is found #}
{% break %}
{% endif %}
{% endfor %}
</span>
</div>
{% endif %}
{% endfor %}
<div class=\"lg:py-1.5 hidden lg:flex lg:justify-between \">
<span>{{ 'Meer informatie'|trans }}</span>
<span class=\"relative text-right text-blue\" x-data=\"{ tooltipOpen: false }\">
<span
class=\"cursor-pointer\"
@click=\"tooltipOpen = !tooltipOpen\"
@click.outside=\"tooltipOpen = false\"
>
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path fill=\"#0072BB\" fill-rule=\"evenodd\" d=\"M8.036 5.235c.433 0 .747-.081.942-.244.196-.162.294-.418.294-.767 0-.358-.098-.618-.294-.78-.195-.163-.51-.244-.942-.244-.433 0-.747.081-.943.243-.195.163-.293.423-.293.78 0 .35.098.606.293.768.196.163.51.244.943.244Zm1.06 6.965V5.959H6.976V12.2h2.122ZM8 14.4A6.4 6.4 0 1 1 14.4 8 6.407 6.407 0 0 1 8 14.4ZM0 8a8 8 0 0 0 16 0 8.009 8.009 0 0 0-8-8 8 8 0 0 0-8 8Z\"/></svg>
</span>
<div
class=\"absolute right-0 z-10 w-64 p-4 bg-white rounded shadow-lg top-5\"
:class=\"tooltipOpen ? 'block' : 'hidden'\"
>
<span class=\"text-sm leading-6 text-gray-900\">
{{ \"Onze specialisten zorgen voor een passende oplossing, vrijblijvend advies en afstemming met u.\"|trans }}
</span>
</div>
</span>
</div>
<div class=\"mt-4\">
{% include 'includes/partials/_rental-form.html.twig' with {
buttonText: 'Offerte aanvragen'|trans,
buttonClass: 'button button__green',
trackButtonId: 'conversion_rentnow',
requestUrl: data.request.url ?? null
} %}
<a href=\"{{ product.page.url | trimUrl }}\" class=\"items-center justify-center !hidden lg:flex button button__secondary\">
Meer informatie
<span class=\"flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white\">
<svg class=\"h-3.5 w-3.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">
<path fill=\"currentColor\" fill-rule=\"currentColor\" d=\"m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z\"></path>
</svg>
</span>
</a>
</div>
</td>
</tr>
{% set showReadMoreSpecsButton = loop.index > shownSpecsOnInitialLoad %}
{% endfor %}
</tbody>
</table>
</div>
{# never show this button when printing (printmode), even though there could be more specs. #}
{% if showReadMoreSpecsButton and printmode is not defined %}
<div class=\"flex justify-center w-full mt-6 \">
<button
class=\"button button__secondary group\"
@click=\"tableOpen = !tableOpen\"
>
<span class=\"flex w-6 h-6 mr-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white \">
<span class=\"flex items-center justify-center w-full h-full \">
<svg
x-show=\"!tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M6.68 0h.024a.929.929 0 0 1 .916.915l.07 4.994 4.994.07a.93.93 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024l-4.995-.07.07 4.995a.878.878 0 0 1-.89.89.93.93 0 0 1-.915-.916L5.91 7.69.914 7.62A.93.93 0 0 1 0 6.704a.878.878 0 0 1 .89-.89l4.994.07L5.814.89A.878.878 0 0 1 6.68 0Z\"/>
</svg>
<svg
x-show=\"tableOpen\"
class=\"w-3.5\"
xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 3\"><path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M12.684.979a.929.929 0 0 1 .916.916.878.878 0 0 1-.866.89h-.024L.915 2.62A.929.929 0 0 1 0 1.704a.878.878 0 0 1 .89-.89l11.794.165Z\"/>
</svg>
</span>
</span>
<span x-show=\"!tableOpen\">
{{ ('Meer {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
<span x-show=\"tableOpen\">
{{ ('Minder {{ productCategory }} tonen') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key)|customLowercase }) }}
</span>
</button>
</div>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}
{% endembed %}
", "areas/product-table-brick/view.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-table-brick/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["extends" => 19];
static $filters = [];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['extends'],
[],
[],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}