<?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;
/* network/horse/sections/horse_section_news.html.twig */
class __TwigTemplate_9d03cf6259c2e7fddc15cf5f84024c1b044d35f94f363d446c24e0f39c49ef43 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "network/horse/sections/horse_section_news.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "network/horse/sections/horse_section_news.html.twig"));
// line 2
echo "<turbo-frame id=\"tab_content\">
";
// line 3
if (twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "user", [], "any", false, false, false, 3)) {
// line 4
echo " ";
$this->extensions['App\Core\Twig\Extension\SectionNavigationExtension']->addSection(["name" => "press-releases", "anchor" => "press-releases"]);
// line 5
echo "
<section class=\"p-4 bg-white md:p-8 xl:p-16\" id=\"press-releases\">
";
// line 8
echo " <h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
";
// line 9
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news"), "html", null, true);
echo "
</h2>
<div data-turbo=\"false\"
";
// line 12
echo $this->extensions['Symfony\UX\React\Twig\ReactComponentExtension']->renderReactComponent($this->env, "NewsList", ["objectId" => twig_get_attribute($this->env, $this->source, // line 15
(isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 15, $this->source); })()), "id", [], "any", false, false, false, 15), "objectType" => twig_get_attribute($this->env, $this->source, (isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 15, $this->source); })()), "classId", [], "any", false, false, false, 15), "limit" => 3, "locale" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 15, $this->source); })()), "request", [], "any", false, false, false, 15), "locale", [], "any", false, false, false, 15)]);
// line 17
echo "></div>
";
// line 25
echo " ";
// line 26
echo " </section>
";
} elseif ( !twig_get_attribute($this->env, $this->source, // line 27
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 27, $this->source); })()), "user", [], "any", false, false, false, 27)) {
// line 28
echo " ";
$this->extensions['App\Core\Twig\Extension\SectionNavigationExtension']->addSection(["name" => "press-releases", "anchor" => "press-releases"]);
// line 29
echo " <section id=\"press-releases\" class=\"container p-4 bg-white md:p-8 xl:p-16\">
<h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
";
// line 31
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news"), "html", null, true);
echo "
</h2>
";
// line 33
$this->loadTemplate("network/profile/components/login_required_hint.html.twig", "network/horse/sections/horse_section_news.html.twig", 33)->display($context);
// line 34
echo " </section>
";
} else {
// line 36
echo " <section id=\"press-releases\" class=\"container p-4 bg-white md:p-8 xl:p-16\">
<h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news"), "html", null, true);
echo "
</h2>
";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("no.horse.news.available"), "html", null, true);
echo "
</section>
";
}
// line 43
echo " <turbo-stream action=\"replace\" target=\"tab_navigation\">
<template>
";
// line 45
$this->loadTemplate("network/horse/components/tab_navigation_component.html.twig", "network/horse/sections/horse_section_news.html.twig", 45)->display(twig_array_merge($context, ["horse" => // line 46
(isset($context["horse"]) || array_key_exists("horse", $context) ? $context["horse"] : (function () { throw new RuntimeError('Variable "horse" does not exist.', 46, $this->source); })()), "highlightedTab" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 47
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 47, $this->source); })()), "request", [], "any", false, false, false, 47), "pathInfo", [], "any", false, false, false, 47)]));
// line 49
echo " </template>
</turbo-stream>
</turbo-frame>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "network/horse/sections/horse_section_news.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 118 => 49, 116 => 47, 115 => 46, 114 => 45, 110 => 43, 104 => 40, 99 => 38, 95 => 36, 91 => 34, 89 => 33, 84 => 31, 80 => 29, 77 => 28, 75 => 27, 72 => 26, 70 => 25, 67 => 17, 65 => 15, 64 => 12, 58 => 9, 55 => 8, 51 => 5, 48 => 4, 46 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{# {% set news = auction.auctionhouse.news ? auction.auctionhouse.news.children : null %} #}
<turbo-frame id=\"tab_content\">
{% if app.user %}
{% do section_navigation_add({ name: 'press-releases', anchor: 'press-releases' }) %}
<section class=\"p-4 bg-white md:p-8 xl:p-16\" id=\"press-releases\">
{# <div class=\"container py-14\"> #}
<h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
{{ 'news'|trans }}
</h2>
<div data-turbo=\"false\"
{{
react_component(
'NewsList',
{ objectId: horse.id, objectType: horse.classId, limit: 3, locale: app.request.locale }
)
}}></div>
{# <turbo-frame id=\"horse-news\"
src=\"{{
path(
'network_horse_news_frame',
{ _locale: app.request.locale, id: horse.id }
)
}}\"></turbo-frame> #}
{# </div> #}
</section>
{% elseif not app.user %}
{% do section_navigation_add({ name: 'press-releases', anchor: 'press-releases' }) %}
<section id=\"press-releases\" class=\"container p-4 bg-white md:p-8 xl:p-16\">
<h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
{{ 'news'|trans }}
</h2>
{% include 'network/profile/components/login_required_hint.html.twig' %}
</section>
{% else %}
<section id=\"press-releases\" class=\"container p-4 bg-white md:p-8 xl:p-16\">
<h2 class=\"text-lg font-medium uppercase md:text-xl font-headline mb-7\">
{{ 'news'|trans }}
</h2>
{{ 'no.horse.news.available'|trans }}
</section>
{% endif %}
<turbo-stream action=\"replace\" target=\"tab_navigation\">
<template>
{% include 'network/horse/components/tab_navigation_component.html.twig' with {
horse: horse,
highlightedTab: app.request.pathInfo
} %}
</template>
</turbo-stream>
</turbo-frame>
", "network/horse/sections/horse_section_news.html.twig", "/var/www/vhosts/3forone.ch/httpdocs/abowire/templates/network/horse/sections/horse_section_news.html.twig");
}
}