var/cache/dev/twig/83/83c5f7a477035ef34bfd091874a7e2d52fa7b693f34379db803f6546a301ee21.php line 43

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. /* _includes/last-establishment.html.twig */
  14. class __TwigTemplate_2ab938f333e8bbc0ec16aeb97c8be46b3582d161b41b248fb99a3997c103a2b2 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""_includes/last-establishment.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""_includes/last-establishment.html.twig"));
  33.         // line 1
  34.         $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"falsefalsefalse1);
  35.         // line 2
  36.         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); })()))) {
  37.             // line 3
  38.             echo "\t<div class=\"nav-block last-establishment\">
  39. \t\t<p class=\"title\">Mes dernières fiches consultées</p>
  40. \t\t<ul ";
  41.             // line 5
  42.             if ((=== 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))) {
  43.                 echo " class=\"slide\" ";
  44.             }
  45.             echo ">
  46. \t\t\t";
  47.             // line 6
  48.             $context['_parent'] = $context;
  49.             $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); })()));
  50.             foreach ($context['_seq'] as $context["_key"] => $context["etab"]) {
  51.                 // line 7
  52.                 echo "\t\t\t\t<li>
  53. \t\t\t\t\t<a href=\"#\" class=\"empty-link\">
  54.                         <span data-href=\"";
  55.                 // line 9
  56.                 echo twig_escape_filter($this->envtwig_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", [=> $context["etab"]], "method"falsefalsefalse9), "html"nulltrue);
  57.                 echo "\" class=\"empty-link\"></span
  58. \t\t\t\t\t\t<figure>
  59. \t\t\t\t\t\t\t";
  60.                 // line 11
  61.                 if ((twig_get_attribute($this->env$this->source$context["etab"], "isClient", [], "any"falsefalsefalse11) &&  !twig_test_empty(twig_get_attribute($this->env$this->source$context["etab"], "logo", [], "any"falsefalsefalse11)))) {
  62.                     // line 12
  63.                     echo "\t\t\t\t\t\t\t\t<img src=\"";
  64.                     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"falsefalsefalse12), "logoFile"), "etab_liste_logo_history"), "html"nulltrue);
  65.                     echo "\" alt=\"";
  66.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["etab"], "denomination", [], "any"falsefalsefalse12), "html"nulltrue);
  67.                     echo "\">
  68. \t\t\t\t\t\t\t";
  69.                 } else {
  70.                     // line 14
  71.                     echo "\t\t\t\t\t\t\t\t<span class=\"no-logo\"></span>
  72. \t\t\t\t\t\t\t";
  73.                 }
  74.                 // line 16
  75.                 echo "\t\t\t\t\t\t</figure>
  76. \t\t\t\t\t\t<p>
  77. \t\t\t\t\t\t\t<strong>";
  78.                 // line 18
  79.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_get_attribute($this->env$this->source$context["etab"], "denomination", [], "any"falsefalsefalse18)), "truncate", [=> 45=> "…"=> true], "method"falsefalsefalse18), "html"nulltrue);
  80.                 echo "</strong><br>
  81. \t\t\t\t\t\t\t";
  82.                 // line 19
  83.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["etab"], "codePostal", [], "any"falsefalsefalse19))) {
  84.                     // line 20
  85.                     echo "\t\t\t\t\t\t\t\t";
  86.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["etab"], "codePostal", [], "any"falsefalsefalse20), "html"nulltrue);
  87.                     echo "
  88. \t\t\t\t\t\t\t";
  89.                 }
  90.                 // line 22
  91.                 echo "\t\t\t\t\t\t\t";
  92.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["etab"], "ville", [], "any"falsefalsefalse22))) {
  93.                     // line 23
  94.                     echo "\t\t\t\t\t\t\t\t";
  95.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["etab"], "ville", [], "any"falsefalsefalse23), "libelle", [], "any"falsefalsefalse23), "html"nulltrue);
  96.                     echo "
  97. \t\t\t\t\t\t\t";
  98.                 }
  99.                 // line 25
  100.                 echo "\t\t\t\t\t\t</p>
  101. \t\t\t\t\t</a>
  102. \t\t\t\t</li>
  103. \t\t\t";
  104.             }
  105.             $_parent $context['_parent'];
  106.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['etab'], $context['_parent'], $context['loop']);
  107.             $context array_intersect_key($context$_parent) + $_parent;
  108.             // line 29
  109.             echo "\t\t</ul>
  110. \t\t";
  111.             // line 30
  112.             if ((=== 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))) {
  113.                 // line 31
  114.                 echo "\t\t\t<span id=\"last-estab-prev\"></span>
  115. \t\t\t<span id=\"last-estab-next\"></span>
  116. \t\t";
  117.             }
  118.             // line 34
  119.             echo "\t</div>
  120. ";
  121.         }
  122.         
  123.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  124.         
  125.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  126.     }
  127.     public function getTemplateName()
  128.     {
  129.         return "_includes/last-establishment.html.twig";
  130.     }
  131.     public function isTraitable()
  132.     {
  133.         return false;
  134.     }
  135.     public function getDebugInfo()
  136.     {
  137.         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,);
  138.     }
  139.     public function getSourceContext()
  140.     {
  141.         return new Source("{% set establishments = historique.getFiches() %}
  142. {% if establishments is not empty %}
  143. \t<div class=\"nav-block last-establishment\">
  144. \t\t<p class=\"title\">Mes dernières fiches consultées</p>
  145. \t\t<ul {% if establishments | length > 4 %} class=\"slide\" {% endif %}>
  146. \t\t\t{% for etab in establishments %}
  147. \t\t\t\t<li>
  148. \t\t\t\t\t<a href=\"#\" class=\"empty-link\">
  149.                         <span data-href=\"{{ pathBuilder.buildFiche(etab) }}\" class=\"empty-link\"></span
  150. \t\t\t\t\t\t<figure>
  151. \t\t\t\t\t\t\t{% if etab.isClient and etab.logo is not empty %}
  152. \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 }}\">
  153. \t\t\t\t\t\t\t{% else %}
  154. \t\t\t\t\t\t\t\t<span class=\"no-logo\"></span>
  155. \t\t\t\t\t\t\t{% endif %}
  156. \t\t\t\t\t\t</figure>
  157. \t\t\t\t\t\t<p>
  158. \t\t\t\t\t\t\t<strong>{{ etab.denomination | u.truncate(45, '…', true) }}</strong><br>
  159. \t\t\t\t\t\t\t{% if etab.codePostal is not empty %}
  160. \t\t\t\t\t\t\t\t{{ etab.codePostal }}
  161. \t\t\t\t\t\t\t{% endif %}
  162. \t\t\t\t\t\t\t{% if etab.ville is not empty %}
  163. \t\t\t\t\t\t\t\t{{ etab.ville.libelle }}
  164. \t\t\t\t\t\t\t{% endif %}
  165. \t\t\t\t\t\t</p>
  166. \t\t\t\t\t</a>
  167. \t\t\t\t</li>
  168. \t\t\t{% endfor %}
  169. \t\t</ul>
  170. \t\t{% if establishments | length > 4 %}
  171. \t\t\t<span id=\"last-estab-prev\"></span>
  172. \t\t\t<span id=\"last-estab-next\"></span>
  173. \t\t{% endif %}
  174. \t</div>
  175. {% endif %}
  176. ""_includes/last-establishment.html.twig""/app/templates/_includes/last-establishment.html.twig");
  177.     }
  178. }