<?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;
/* news/detail.html.twig */
class __TwigTemplate_a71048fa357a5bda9d84c2d05040512b7eeb41604891048917a9422d8cd066a0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layout.html.twig";
}
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", "news/detail.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/detail.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "news/detail.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_content($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(), "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 4
echo "
<main id=\"main\" role=\"main\">
<div class=\"apk-news-detail\">
<div class=\"uk-container\">
";
// line 9
if (((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 9, $this->source); })()) == false)) {
// line 10
echo " <div class=\"uk-alert-danger\" uk-alert>
<p>";
// line 11
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aucune news ne correspond à l'url suivante : "), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, 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.', 11, $this->source); })()), "request", [], "any", false, false, false, 11), "getUri", [], "method", false, false, false, 11), "html", null, true);
echo "</p>
</div>
";
} else {
// line 15
echo "
<div>
<div class=\"apk-news-detail-container\">
<div class=\"apk-media uk-cover-container\">
<a href=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsDetail", ["slug" => twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 19, $this->source); })()), "getSlug", [], "method", false, false, false, 19)]), "html", null, true);
echo "\">
<img class=\"uk-cover\" uk-cover src=\"";
// line 20
echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 20, $this->source); })()), "getImage", [], "method", false, false, false, 20), "getThumbnail", [0 => "news-background"], "method", false, false, false, 20);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 20, $this->source); })()), "getTitle", [], "method", false, false, false, 20), "html", null, true);
echo "\">
</a>
</div>
<div class=\"apk-content uk-margin-medium-top\">
<h1 class=\"uk-h2\">";
// line 24
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 24, $this->source); })()), "getTitle", [], "method", false, false, false, 24), "html", null, true);
echo "</h1>
<span class=\"apk-date \">
";
// line 26
echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\Apik']->convertDate(twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 26, $this->source); })()), "getPublishDate", [], "method", false, false, false, 26), "d F Y", 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.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "locale", [], "any", false, false, false, 26)), "html", null, true);
echo "
</span>
";
// line 28
echo twig_get_attribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 28, $this->source); })()), "getContent", [], "method", false, false, false, 28);
echo "
</div>
</div>
</div>
";
}
// line 34
echo "
<div class=\"uk-margin-medium-top\">
<a class=\"uk-flex uk-flex-left uk-flex-middle\" href=\"";
// line 36
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsList");
echo "\">
<img uk-svg class=\"uk-margin-small-right\" width=\"20\" height=\"20\" src=\"/static/img/pictos/arrow-left.svg\" alt=\"";
// line 37
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Rertour"), "html", null, true);
echo "\">
";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Rertour aux news"), "html", null, true);
echo "
</a>
</div>
</div>
</div>
</main>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "news/detail.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 139 => 38, 135 => 37, 131 => 36, 127 => 34, 118 => 28, 113 => 26, 108 => 24, 99 => 20, 95 => 19, 89 => 15, 80 => 11, 77 => 10, 75 => 9, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout.html.twig' %}
{% block content %}
<main id=\"main\" role=\"main\">
<div class=\"apk-news-detail\">
<div class=\"uk-container\">
{% if news == false %}
<div class=\"uk-alert-danger\" uk-alert>
<p>{{ \"Aucune news ne correspond à l'url suivante : \"|trans }} {{ app.request.getUri() }}</p>
</div>
{% else %}
<div>
<div class=\"apk-news-detail-container\">
<div class=\"apk-media uk-cover-container\">
<a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
<img class=\"uk-cover\" uk-cover src=\"{{news.getImage().getThumbnail('news-background')| raw}}\" alt=\"{{ news.getTitle() }}\">
</a>
</div>
<div class=\"apk-content uk-margin-medium-top\">
<h1 class=\"uk-h2\">{{news.getTitle()}}</h1>
<span class=\"apk-date \">
{{ convert_date(news.getPublishDate(), 'd F Y', app.request.locale) }}
</span>
{{news.getContent() |raw}}
</div>
</div>
</div>
{% endif %}
<div class=\"uk-margin-medium-top\">
<a class=\"uk-flex uk-flex-left uk-flex-middle\" href=\"{{ path('newsList') }}\">
<img uk-svg class=\"uk-margin-small-right\" width=\"20\" height=\"20\" src=\"/static/img/pictos/arrow-left.svg\" alt=\"{{ \"Rertour\"|trans }}\">
{{ \"Rertour aux news\"|trans }}
</a>
</div>
</div>
</div>
</main>
{% endblock %}
", "news/detail.html.twig", "/var/www/mynursery.apik-pp.be/www/templates/news/detail.html.twig");
}
}