<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @SyliusShop/Product/Show/Tabs/rfq.html.twig */
class __TwigTemplate_e8f5987483a2fffe0bfc37170c6c038c extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/Tabs/rfq.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/Tabs/rfq.html.twig"));
// line 1
if ($this->extensions['MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 2
echo " ";
if (((((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, true, false, 2), "code", [], "any", true, true, false, 2)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, true, false, 2), "code", [], "any", false, false, false, 2))) : ("")) != "services") && ($this->env->getFunction('vendor_can_rfq')->getCallable()((isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 2, $this->source); })())) == true))) {
// line 3
echo " <div class=\"ui tab active\" data-tab=\"rfq\">
";
// line 4
if ((isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 4, $this->source); })())) {
// line 5
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_common_rfq_preview_create", ["template" => "@SyliusShop/Product/Show/_rfq.html.twig"]));
echo "
";
} else {
// line 7
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_common_rfq_create", ["template" => "@SyliusShop/Product/Show/_rfq.html.twig", "productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 7, $this->source); })()), "id", [], "any", false, false, false, 7), "slug" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 7, $this->source); })()), "slug", [], "any", false, false, false, 7)]));
echo "
";
}
// line 9
echo " </div>
";
}
} else {
// line 12
echo " ";
if (((((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, true, false, 12), "code", [], "any", true, true, false, 12)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, true, false, 12), "code", [], "any", false, false, false, 12))) : ("")) != "services") && ($this->env->getFunction('vendor_can_rfq')->getCallable()((isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 12, $this->source); })())) == true))) {
// line 13
echo " <div class=\"ui top attached large tabular menu product-tabs\">
<a class=\"item active\" data-tab=\"rfq\">";
// line 14
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.product.tabs.rfq"), "html", null, true);
echo "</a>
</div>
<div class=\"ui bottom attached tab segment product-tabs active\" data-tab=\"rfq\">
";
// line 18
if ((isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 18, $this->source); })())) {
// line 19
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_common_rfq_preview_create", ["template" => "@SyliusShop/Product/Show/_rfq.html.twig"]));
echo "
";
} else {
// line 21
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_common_rfq_create", ["template" => "@SyliusShop/Product/Show/_rfq.html.twig", "productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 21, $this->source); })()), "id", [], "any", false, false, false, 21), "slug" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 21, $this->source); })()), "slug", [], "any", false, false, false, 21)]));
echo "
";
}
// line 23
echo " </div>
";
}
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/Tabs/rfq.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 97 => 23, 91 => 21, 85 => 19, 83 => 18, 76 => 14, 73 => 13, 70 => 12, 65 => 9, 59 => 7, 53 => 5, 51 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if is_mobile() %}
{% if product.mainTaxon.code|default != 'services' and vendor_can_rfq(product) == true %}
<div class=\"ui tab active\" data-tab=\"rfq\">
{% if preview %}
{{ render(url('app_common_rfq_preview_create', {'template': '@SyliusShop/Product/Show/_rfq.html.twig'})) }}
{% else %}
{{ render(url('app_common_rfq_create', {'template': '@SyliusShop/Product/Show/_rfq.html.twig', 'productId': product.id, 'slug': product.slug})) }}
{% endif %}
</div>
{% endif %}
{% else %}
{% if product.mainTaxon.code|default != 'services' and vendor_can_rfq(product) == true %}
<div class=\"ui top attached large tabular menu product-tabs\">
<a class=\"item active\" data-tab=\"rfq\">{{ 'app.ui.product.tabs.rfq'|trans }}</a>
</div>
<div class=\"ui bottom attached tab segment product-tabs active\" data-tab=\"rfq\">
{% if preview %}
{{ render(url('app_common_rfq_preview_create', {'template': '@SyliusShop/Product/Show/_rfq.html.twig'})) }}
{% else %}
{{ render(url('app_common_rfq_create', {'template': '@SyliusShop/Product/Show/_rfq.html.twig', 'productId': product.id, 'slug': product.slug})) }}
{% endif %}
</div>
{% endif %}
{% endif %}", "@SyliusShop/Product/Show/Tabs/rfq.html.twig", "/srv/open_marketplace/templates/bundles/SyliusShopBundle/Product/Show/Tabs/rfq.html.twig");
}
}