var/cache/dev/twig/97/978a0a0b09bd7ed8b0aeb646aeca40eeeea518a0300f042737aab62d1b76d637.php line 38

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* news/list.html.twig */
  14. class __TwigTemplate_efcb9e00391a3e0ae5d41484959dc7aa2b2a31ad3f1e30ed33b60b6f7fe6e113 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source = $this->getSourceContext();
  22.         $this->blocks = [
  23.             'content' => [$this, 'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "layout.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros = $this->macros;
  34.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/list.html.twig"));
  36.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/list.html.twig"));
  38.         $this->parent = $this->loadTemplate("layout.html.twig", "news/list.html.twig", 1);
  39.         $this->parent->display($context, array_merge($this->blocks, $blocks));
  40.         
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  42.         
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  44.     }
  45.     // line 3
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros = $this->macros;
  49.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  51.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  53.         // line 4
  54.         echo "<main id=\"main\" role=\"main\">
  55.     <div class=\"apk-news\">
  56.         <div class=\"uk-container\">
  57.             <div class=\"uk-text-left\">
  58.                 <h1 class=\"uk-h2 apk-underlined apk-underlined-orange2\">";
  59.         // line 8
  60.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "title", ["placeholder" => "Titre de la page", "nl2br" => true]);
  61.         echo "</h1>
  62.             </div>
  63.             <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\">
  64.                 ";
  65.         // line 12
  66.         $context['_parent'] = $context;
  67.         $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); })()));
  68.         foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
  69.             // line 13
  70.             echo "                    <div>
  71.                         <div class=\"apk-news-container\">
  72.                             <div class=\"apk-media uk-cover-container\">
  73.                                 <a href=\"";
  74.             // line 16
  75.             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);
  76.             echo "\">
  77.                                     ";
  78.             // line 17
  79.             if (twig_get_attribute($this->env, $this->source, $context["news"], "getImage", [], "method", false, false, false, 17)) {
  80.                 // line 18
  81.                 echo "                                        <img class=\"uk-cover\" uk-cover src=\"";
  82.                 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);
  83.                 echo "\" alt=\"";
  84.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "getTitle", [], "method", false, false, false, 18), "html", null, true);
  85.                 echo "\">    
  86.                                     ";
  87.             } else {
  88.                 // line 20
  89.                 echo "                                        <img src=\"/static/img/logos/no_photo.jpg\" alt=\"";
  90.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aucune photo"), "html", null, true);
  91.                 echo "\">
  92.                                     ";
  93.             }
  94.             // line 22
  95.             echo "                                    
  96.                                 </a>
  97.                             </div>
  98.                             <div class=\"apk-content\">
  99.                                 <p class=\"apk-date uk-text-lowercase uk-margin-small-top uk-margin-small-bottom\">
  100.                                     ";
  101.             // line 27
  102.             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);
  103.             echo "
  104.                                 </p>
  105.                                 <a href=\"";
  106.             // line 29
  107.             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);
  108.             echo "\">
  109.                                     <h3 class=\"uk-h3 uk-margin-remove\">";
  110.             // line 30
  111.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "getTitle", [], "method", false, false, false, 30), "html", null, true);
  112.             echo "</h3>
  113.                                 </a>
  114.                                 <p class=\"apk-font-16 uk-margin-remove-top\">";
  115.             // line 32
  116.             echo twig_get_attribute($this->env, $this->source, $context["news"], "getShortText", [], "method", false, false, false, 32);
  117.             echo "</p>
  118.                             </div>
  119.                             <div class=\"apk-action uk-margin-top\">
  120.                                 <a class=\"uk-flex uk-flex-middle\" href=\"";
  121.             // line 35
  122.             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);
  123.             echo "\">
  124.                                     ";
  125.             // line 36
  126.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lire plus"), "html", null, true);
  127.             echo "
  128.                                     <img width=\"10\" height=\"20\" uk-svg class=\"uk-margin-small-left\" src=\"/static/img/pictos/double_arrow.svg\" alt=\"";
  129.             // line 37
  130.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Double Arrow"), "html", null, true);
  131.             echo "\">
  132.                                 </a>
  133.                             </div>
  134.                         </div>
  135.                     </div>
  136.                 ";
  137.         }
  138.         $_parent = $context['_parent'];
  139.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
  140.         $context = array_intersect_key($context, $_parent) + $_parent;
  141.         // line 44
  142.         echo "            </div>
  143.             ";
  144.         // line 45
  145.         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)) {
  146.             // line 46
  147.             echo "            <div class=\"uk-flex uk-flex-center uk-margin-medium-top\">
  148.                 ";
  149.             // line 47
  150.             $this->loadTemplate("includes/pagination.html.twig", "news/list.html.twig", 47)->display($context);
  151.             // line 48
  152.             echo "            </div>
  153.             ";
  154.         }
  155.         // line 50
  156.         echo "        </div>
  157.     </section>
  158. </main>
  159. ";
  160.         
  161.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  162.         
  163.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  164.     }
  165.     public function getTemplateName()
  166.     {
  167.         return "news/list.html.twig";
  168.     }
  169.     public function isTraitable()
  170.     {
  171.         return false;
  172.     }
  173.     public function getDebugInfo()
  174.     {
  175.         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,);
  176.     }
  177.     public function getSourceContext()
  178.     {
  179.         return new Source("{% extends 'layout.html.twig' %}
  180. {% block content %}
  181. <main id=\"main\" role=\"main\">
  182.     <div class=\"apk-news\">
  183.         <div class=\"uk-container\">
  184.             <div class=\"uk-text-left\">
  185.                 <h1 class=\"uk-h2 apk-underlined apk-underlined-orange2\">{{ pimcore_textarea('title', {'placeholder' : 'Titre de la page', 'nl2br' : true}) }}</h1>
  186.             </div>
  187.             <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\">
  188.                 {% for news in paginator %}
  189.                     <div>
  190.                         <div class=\"apk-news-container\">
  191.                             <div class=\"apk-media uk-cover-container\">
  192.                                 <a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
  193.                                     {% if news.getImage() %}
  194.                                         <img class=\"uk-cover\" uk-cover src=\"{{news.getImage().getThumbnail('news-thumb')| raw}}\" alt=\"{{ news.getTitle() }}\">    
  195.                                     {% else %}
  196.                                         <img src=\"/static/img/logos/no_photo.jpg\" alt=\"{{ \"Aucune photo\"|trans }}\">
  197.                                     {% endif %}
  198.                                     
  199.                                 </a>
  200.                             </div>
  201.                             <div class=\"apk-content\">
  202.                                 <p class=\"apk-date uk-text-lowercase uk-margin-small-top uk-margin-small-bottom\">
  203.                                     {{ convert_date(news.getPublishDate(), 'd F Y', app.request.locale) }}
  204.                                 </p>
  205.                                 <a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
  206.                                     <h3 class=\"uk-h3 uk-margin-remove\">{{news.getTitle()}}</h3>
  207.                                 </a>
  208.                                 <p class=\"apk-font-16 uk-margin-remove-top\">{{news.getShortText() |raw}}</p>
  209.                             </div>
  210.                             <div class=\"apk-action uk-margin-top\">
  211.                                 <a class=\"uk-flex uk-flex-middle\" href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
  212.                                     {{'Lire plus' | trans}}
  213.                                     <img width=\"10\" height=\"20\" uk-svg class=\"uk-margin-small-left\" src=\"/static/img/pictos/double_arrow.svg\" alt=\"{{ \"Double Arrow\"|trans }}\">
  214.                                 </a>
  215.                             </div>
  216.                         </div>
  217.                     </div>
  218.                 {% endfor %}
  219.             </div>
  220.             {% if paginator|length > 0 %}
  221.             <div class=\"uk-flex uk-flex-center uk-margin-medium-top\">
  222.                 {% include 'includes/pagination.html.twig' %}
  223.             </div>
  224.             {% endif %}
  225.         </div>
  226.     </section>
  227. </main>
  228. {%  endblock %}
  229. ", "news/list.html.twig", "/var/www/mynursery.apik-pp.be/www/templates/news/list.html.twig");
  230.     }
  231. }