<?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;
/* _includes/last-establishment.html.twig */
class __TwigTemplate_2ab938f333e8bbc0ec16aeb97c8be46b3582d161b41b248fb99a3997c103a2b2 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", "_includes/last-establishment.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "_includes/last-establishment.html.twig"));
// line 1
$context["establishments"] = twig_get_attribute($this->env, $this->source, (isset($context["historique"]) || array_key_exists("historique", $context) ? $context["historique"] : (function () { throw new RuntimeError('Variable "historique" does not exist.', 1, $this->source); })()), "getFiches", [], "method", false, false, false, 1);
// line 2
if ( !twig_test_empty((isset($context["establishments"]) || array_key_exists("establishments", $context) ? $context["establishments"] : (function () { throw new RuntimeError('Variable "establishments" does not exist.', 2, $this->source); })()))) {
// line 3
echo "\t<div class=\"nav-block last-establishment\">
\t\t<p class=\"title\">Mes dernières fiches consultées</p>
\t\t<ul ";
// line 5
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["establishments"]) || array_key_exists("establishments", $context) ? $context["establishments"] : (function () { throw new RuntimeError('Variable "establishments" does not exist.', 5, $this->source); })())), 4))) {
echo " class=\"slide\" ";
}
echo ">
\t\t\t";
// line 6
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["establishments"]) || array_key_exists("establishments", $context) ? $context["establishments"] : (function () { throw new RuntimeError('Variable "establishments" does not exist.', 6, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["etab"]) {
// line 7
echo "\t\t\t\t<li>
\t\t\t\t\t<a href=\"#\" class=\"empty-link\">
<span data-href=\"";
// line 9
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 9, $this->source); })()), "buildFiche", [0 => $context["etab"]], "method", false, false, false, 9), "html", null, true);
echo "\" class=\"empty-link\"></span
\t\t\t\t\t\t<figure>
\t\t\t\t\t\t\t";
// line 11
if ((twig_get_attribute($this->env, $this->source, $context["etab"], "isClient", [], "any", false, false, false, 11) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["etab"], "logo", [], "any", false, false, false, 11)))) {
// line 12
echo "\t\t\t\t\t\t\t\t<img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env, $this->source, $context["etab"], "logo", [], "any", false, false, false, 12), "logoFile"), "etab_liste_logo_history"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["etab"], "denomination", [], "any", false, false, false, 12), "html", null, true);
echo "\">
\t\t\t\t\t\t\t";
} else {
// line 14
echo "\t\t\t\t\t\t\t\t<span class=\"no-logo\"></span>
\t\t\t\t\t\t\t";
}
// line 16
echo "\t\t\t\t\t\t</figure>
\t\t\t\t\t\t<p>
\t\t\t\t\t\t\t<strong>";
// line 18
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_get_attribute($this->env, $this->source, $context["etab"], "denomination", [], "any", false, false, false, 18)), "truncate", [0 => 45, 1 => "…", 2 => true], "method", false, false, false, 18), "html", null, true);
echo "</strong><br>
\t\t\t\t\t\t\t";
// line 19
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["etab"], "codePostal", [], "any", false, false, false, 19))) {
// line 20
echo "\t\t\t\t\t\t\t\t";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["etab"], "codePostal", [], "any", false, false, false, 20), "html", null, true);
echo "
\t\t\t\t\t\t\t";
}
// line 22
echo "\t\t\t\t\t\t\t";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["etab"], "ville", [], "any", false, false, false, 22))) {
// line 23
echo "\t\t\t\t\t\t\t\t";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["etab"], "ville", [], "any", false, false, false, 23), "libelle", [], "any", false, false, false, 23), "html", null, true);
echo "
\t\t\t\t\t\t\t";
}
// line 25
echo "\t\t\t\t\t\t</p>
\t\t\t\t\t</a>
\t\t\t\t</li>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['etab'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
echo "\t\t</ul>
\t\t";
// line 30
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["establishments"]) || array_key_exists("establishments", $context) ? $context["establishments"] : (function () { throw new RuntimeError('Variable "establishments" does not exist.', 30, $this->source); })())), 4))) {
// line 31
echo "\t\t\t<span id=\"last-estab-prev\"></span>
\t\t\t<span id=\"last-estab-next\"></span>
\t\t";
}
// line 34
echo "\t</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "_includes/last-establishment.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 128 => 34, 123 => 31, 121 => 30, 118 => 29, 109 => 25, 103 => 23, 100 => 22, 94 => 20, 92 => 19, 88 => 18, 84 => 16, 80 => 14, 72 => 12, 70 => 11, 65 => 9, 61 => 7, 57 => 6, 51 => 5, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set establishments = historique.getFiches() %}
{% if establishments is not empty %}
\t<div class=\"nav-block last-establishment\">
\t\t<p class=\"title\">Mes dernières fiches consultées</p>
\t\t<ul {% if establishments | length > 4 %} class=\"slide\" {% endif %}>
\t\t\t{% for etab in establishments %}
\t\t\t\t<li>
\t\t\t\t\t<a href=\"#\" class=\"empty-link\">
<span data-href=\"{{ pathBuilder.buildFiche(etab) }}\" class=\"empty-link\"></span
\t\t\t\t\t\t<figure>
\t\t\t\t\t\t\t{% if etab.isClient and etab.logo is not empty %}
\t\t\t\t\t\t\t\t<img src=\"{{ vich_uploader_asset(etab.logo, 'logoFile') | imagine_filter('etab_liste_logo_history') }}\" alt=\"{{ etab.denomination }}\">
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<span class=\"no-logo\"></span>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</figure>
\t\t\t\t\t\t<p>
\t\t\t\t\t\t\t<strong>{{ etab.denomination | u.truncate(45, '…', true) }}</strong><br>
\t\t\t\t\t\t\t{% if etab.codePostal is not empty %}
\t\t\t\t\t\t\t\t{{ etab.codePostal }}
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t{% if etab.ville is not empty %}
\t\t\t\t\t\t\t\t{{ etab.ville.libelle }}
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</p>
\t\t\t\t\t</a>
\t\t\t\t</li>
\t\t\t{% endfor %}
\t\t</ul>
\t\t{% if establishments | length > 4 %}
\t\t\t<span id=\"last-estab-prev\"></span>
\t\t\t<span id=\"last-estab-next\"></span>
\t\t{% endif %}
\t</div>
{% endif %}
", "_includes/last-establishment.html.twig", "/app/templates/_includes/last-establishment.html.twig");
}
}