<?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;
/* front/catalog/model/view/caracteristics.html.twig */
class __TwigTemplate_ffd94ab4429d9eff4fc1009a0f5cdcc7 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 = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/caracteristics.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/caracteristics.html.twig"));
// line 1
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 1, $this->source); })()), "caracteristics", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 2
yield "<div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
<div class=\"title-ctn\">
<div class=\"title\">";
// line 4
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Caractéristiques", [], "messages");
yield "</div>
<hr>
</div>
<table>
<tbody>
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 9, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 10
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "caracteristics", [], "any", false, false, false, 10));
foreach ($context['_seq'] as $context["_key"] => $context["attribute"]) {
// line 11
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 11), "code", [], "any", false, false, false, 11) == "origin_country")) {
// line 12
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 12) == "France")) {
// line 13
yield " <tr class=\"attribute-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 13), "html", null, true);
yield "\" data-attr=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 13), "code", [], "any", false, false, false, 13), "html", null, true);
yield "\" data-aid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 13), "id", [], "any", false, false, false, 13), "html", null, true);
yield "\" data-paid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 13), "html", null, true);
yield "\">
<td>";
// line 14
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 14), "title", [], "any", false, false, false, 14), "html", null, true);
yield "</td>
<td>";
// line 15
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 15), "html", null, true);
yield "</td>
</tr>
";
} elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, // line 17
$context["attribute"], "value", [], "any", false, false, false, 17), ["Allemagne", "Belgique", "Espagne", "Italie", "Pologne", "Roumanie", "Grande Bretagne", "Union Européenne"])) {
// line 18
yield " <tr class=\"attribute-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 18), "html", null, true);
yield "\" data-attr=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 18), "code", [], "any", false, false, false, 18), "html", null, true);
yield "\" data-aid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 18), "id", [], "any", false, false, false, 18), "html", null, true);
yield "\" data-paid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 18), "html", null, true);
yield "\">
<td>";
// line 19
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 19), "title", [], "any", false, false, false, 19), "html", null, true);
yield "</td>
<td>Europe</td>
</tr>
";
}
// line 23
yield " ";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 23), "code", [], "any", false, false, false, 23) == "product_brand") && CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 23))) {
// line 24
yield " <tr class=\"attribute-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 24), "html", null, true);
yield "\" data-attr=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 24), "code", [], "any", false, false, false, 24), "html", null, true);
yield "\" data-aid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 24), "id", [], "any", false, false, false, 24), "html", null, true);
yield "\" data-paid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 24), "html", null, true);
yield "\">
<td>";
// line 25
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 25), "title", [], "any", false, false, false, 25), "html", null, true);
yield "</td>
<td><a href=\"";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("manufacturer", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 26), "id", [], "any", false, false, false, 26), "url" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 26), "url", [], "any", false, false, false, 26)]), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "manufacturer", [], "any", false, false, false, 26), "name", [], "any", false, false, false, 26), "html", null, true);
yield "</a></td>
</tr>
";
} else {
// line 29
yield " <tr class=\"attribute-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 29), "html", null, true);
yield "\" data-attr=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 29), "code", [], "any", false, false, false, 29), "html", null, true);
yield "\" data-aid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 29), "id", [], "any", false, false, false, 29), "html", null, true);
yield "\" data-paid=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 29), "html", null, true);
yield "\">
<td>";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 30), "title", [], "any", false, false, false, 30), "html", null, true);
yield "</td>
<td>
";
// line 32
if ((($tmp = $context["attribute"]) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 33
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "displayedValue", [], "any", false, false, false, 33), "html", null, true);
yield "
";
} elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 34
$context["attribute"], "value", [], "any", false, false, false, 34) == 1)) {
// line 35
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Oui"), "html", null, true);
yield "
";
} elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 36
$context["attribute"], "value", [], "any", false, false, false, 36) == 0)) {
// line 37
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Non"), "html", null, true);
yield "
";
}
// line 39
yield " </td>
</tr>
";
}
// line 42
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['attribute'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 44
yield " </tbody>
</table>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/catalog/model/view/caracteristics.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 198 => 44, 192 => 43, 186 => 42, 181 => 39, 175 => 37, 173 => 36, 168 => 35, 166 => 34, 161 => 33, 159 => 32, 154 => 30, 143 => 29, 135 => 26, 131 => 25, 120 => 24, 117 => 23, 110 => 19, 99 => 18, 97 => 17, 92 => 15, 88 => 14, 77 => 13, 74 => 12, 71 => 11, 66 => 10, 62 => 9, 54 => 4, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% if product.caracteristics %}
<div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
<div class=\"title-ctn\">
<div class=\"title\">{% trans %}Caractéristiques{% endtrans %}</div>
<hr>
</div>
<table>
<tbody>
{% for p in products %}
{% for attribute in p.caracteristics %}
{% if attribute.attribute.code == \x27origin_country\x27 %}
{% if attribute.value == \x27France\x27 %}
<tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
<td>{{ attribute.attribute.title }}</td>
<td>{{ attribute.value }}</td>
</tr>
{% elseif attribute.value in [\x27Allemagne\x27,\x27Belgique\x27,\x27Espagne\x27,\x27Italie\x27,\x27Pologne\x27,\x27Roumanie\x27,\x27Grande Bretagne\x27,\x27Union Européenne\x27] %}
<tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
<td>{{ attribute.attribute.title }}</td>
<td>Europe</td>
</tr>
{% endif %}
{% elseif attribute.attribute.code == \x27product_brand\x27 and p.manufacturer %}
<tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
<td>{{ attribute.attribute.title }}</td>
<td><a href=\"{{ path(\x27manufacturer\x27, {id:p.manufacturer.id, url:p.manufacturer.url}) }}\">{{ p.manufacturer.name }}</a></td>
</tr>
{% else %}
<tr class=\"attribute-{{ p.id }}\" data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
<td>{{ attribute.attribute.title }}</td>
<td>
{% if attribute %}
{{ attribute.displayedValue }}
{% elseif attribute.value == 1 %}
{{ \x27Oui\x27 | trans }}
{% elseif attribute.value == 0 %}
{{ \x27Non\x27 | trans }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
", "front/catalog/model/view/caracteristics.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/model/view/caracteristics.html.twig");
}
}