<?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/list.html.twig */
class __TwigTemplate_efcb9e00391a3e0ae5d41484959dc7aa2b2a31ad3f1e30ed33b60b6f7fe6e113 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/list.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/list.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "news/list.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\">
<div class=\"uk-container\">
<div class=\"uk-text-left\">
<h1 class=\"uk-h2 apk-underlined apk-underlined-orange2\">";
// line 8
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "title", ["placeholder" => "Titre de la page", "nl2br" => true]);
echo "</h1>
</div>
<div class=\"uk-child-width-1-3@m uk-child-width-1-2@s uk-margin-medium-top uk-grid\" uk-grid uk-height-match=\"target: .apk-content\">
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["paginator"]) || array_key_exists("paginator", $context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.', 12, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
// line 13
echo " <div>
<div class=\"apk-news-container\">
<div class=\"apk-media uk-cover-container\">
<a href=\"";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsDetail", ["slug" => twig_get_attribute($this->env, $this->source, $context["news"], "getSlug", [], "method", false, false, false, 16)]), "html", null, true);
echo "\">
";
// line 17
if (twig_get_attribute($this->env, $this->source, $context["news"], "getImage", [], "method", false, false, false, 17)) {
// line 18
echo " <img class=\"uk-cover\" uk-cover src=\"";
echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["news"], "getImage", [], "method", false, false, false, 18), "getThumbnail", [0 => "news-thumb"], "method", false, false, false, 18);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "getTitle", [], "method", false, false, false, 18), "html", null, true);
echo "\">
";
} else {
// line 20
echo " <img src=\"/static/img/logos/no_photo.jpg\" alt=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aucune photo"), "html", null, true);
echo "\">
";
}
// line 22
echo "
</a>
</div>
<div class=\"apk-content\">
<p class=\"apk-date uk-text-lowercase uk-margin-small-top uk-margin-small-bottom\">
";
// line 27
echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\Apik']->convertDate(twig_get_attribute($this->env, $this->source, $context["news"], "getPublishDate", [], "method", false, false, false, 27), "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.', 27, $this->source); })()), "request", [], "any", false, false, false, 27), "locale", [], "any", false, false, false, 27)), "html", null, true);
echo "
</p>
<a href=\"";
// line 29
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsDetail", ["slug" => twig_get_attribute($this->env, $this->source, $context["news"], "getSlug", [], "method", false, false, false, 29)]), "html", null, true);
echo "\">
<h3 class=\"uk-h3 uk-margin-remove\">";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "getTitle", [], "method", false, false, false, 30), "html", null, true);
echo "</h3>
</a>
<p class=\"apk-font-16 uk-margin-remove-top\">";
// line 32
echo twig_get_attribute($this->env, $this->source, $context["news"], "getShortText", [], "method", false, false, false, 32);
echo "</p>
</div>
<div class=\"apk-action uk-margin-top\">
<a class=\"uk-flex uk-flex-middle\" href=\"";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsDetail", ["slug" => twig_get_attribute($this->env, $this->source, $context["news"], "getSlug", [], "method", false, false, false, 35)]), "html", null, true);
echo "\">
";
// line 36
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lire plus"), "html", null, true);
echo "
<img width=\"10\" height=\"20\" uk-svg class=\"uk-margin-small-left\" src=\"/static/img/pictos/double_arrow.svg\" alt=\"";
// line 37
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Double Arrow"), "html", null, true);
echo "\">
</a>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 44
echo " </div>
";
// line 45
if ((twig_length_filter($this->env, (isset($context["paginator"]) || array_key_exists("paginator", $context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.', 45, $this->source); })())) > 0)) {
// line 46
echo " <div class=\"uk-flex uk-flex-center uk-margin-medium-top\">
";
// line 47
$this->loadTemplate("includes/pagination.html.twig", "news/list.html.twig", 47)->display($context);
// line 48
echo " </div>
";
}
// line 50
echo " </div>
</section>
</main>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "news/list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 172 => 50, 168 => 48, 166 => 47, 163 => 46, 161 => 45, 158 => 44, 145 => 37, 141 => 36, 137 => 35, 131 => 32, 126 => 30, 122 => 29, 117 => 27, 110 => 22, 104 => 20, 96 => 18, 94 => 17, 90 => 16, 85 => 13, 81 => 12, 74 => 8, 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\">
<div class=\"uk-container\">
<div class=\"uk-text-left\">
<h1 class=\"uk-h2 apk-underlined apk-underlined-orange2\">{{ pimcore_textarea('title', {'placeholder' : 'Titre de la page', 'nl2br' : true}) }}</h1>
</div>
<div class=\"uk-child-width-1-3@m uk-child-width-1-2@s uk-margin-medium-top uk-grid\" uk-grid uk-height-match=\"target: .apk-content\">
{% for news in paginator %}
<div>
<div class=\"apk-news-container\">
<div class=\"apk-media uk-cover-container\">
<a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
{% if news.getImage() %}
<img class=\"uk-cover\" uk-cover src=\"{{news.getImage().getThumbnail('news-thumb')| raw}}\" alt=\"{{ news.getTitle() }}\">
{% else %}
<img src=\"/static/img/logos/no_photo.jpg\" alt=\"{{ \"Aucune photo\"|trans }}\">
{% endif %}
</a>
</div>
<div class=\"apk-content\">
<p class=\"apk-date uk-text-lowercase uk-margin-small-top uk-margin-small-bottom\">
{{ convert_date(news.getPublishDate(), 'd F Y', app.request.locale) }}
</p>
<a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
<h3 class=\"uk-h3 uk-margin-remove\">{{news.getTitle()}}</h3>
</a>
<p class=\"apk-font-16 uk-margin-remove-top\">{{news.getShortText() |raw}}</p>
</div>
<div class=\"apk-action uk-margin-top\">
<a class=\"uk-flex uk-flex-middle\" href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
{{'Lire plus' | trans}}
<img width=\"10\" height=\"20\" uk-svg class=\"uk-margin-small-left\" src=\"/static/img/pictos/double_arrow.svg\" alt=\"{{ \"Double Arrow\"|trans }}\">
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% if paginator|length > 0 %}
<div class=\"uk-flex uk-flex-center uk-margin-medium-top\">
{% include 'includes/pagination.html.twig' %}
</div>
{% endif %}
</div>
</section>
</main>
{% endblock %}
", "news/list.html.twig", "/var/www/mynursery.apik-pp.be/www/templates/news/list.html.twig");
}
}