<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;

/* clients/_popup_history_equipement_utilisateur.html.twig */
class __TwigTemplate_784d3623636a85a75cd816c05841f7a65d527f5a87d6e713ce934cc3b323e663 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", "clients/_popup_history_equipement_utilisateur.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "clients/_popup_history_equipement_utilisateur.html.twig"));

        // line 1
        yield "<div id=\"popup-history-equipement-utilisateur\" style=\"display:none\" >
    ";
        // line 2
        $context["historiqueEquipementUtilisateur"] = Twig\Extension\CoreExtension::sort($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["equipement"]) || array_key_exists("equipement", $context) ? $context["equipement"] : (function () { throw new RuntimeError('Variable "equipement" does not exist.', 2, $this->source); })()), "getHistoriqueEquipementUtilisateurs", [], "any", false, false, false, 2), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (((1 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 2, $this->source); })()), "dateHeure", [], "any", false, false, false, 2), CoreExtension::getAttribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 2, $this->source); })()), "dateHeure", [], "any", false, false, false, 2)))) ? ( -1) : (1)); });
        // line 3
        yield "    <table class=\"table table-striped table-bordered\">
        <thead>
            <th>Date changement</th>
            <th>Utilisateur</th>
            <th>Commentaire</th>
            <th>Modifié par</th>
        </thead>
        <tbody>
            ";
        // line 11
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["historiqueEquipementUtilisateur"]) || array_key_exists("historiqueEquipementUtilisateur", $context) ? $context["historiqueEquipementUtilisateur"] : (function () { throw new RuntimeError('Variable "historiqueEquipementUtilisateur" does not exist.', 11, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["historique"]) {
            // line 12
            yield "               <tr>
                    <td>";
            // line 13
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["historique"], "dateHeure", [], "any", false, false, false, 13), "d/m/Y h:m"), "html", null, true);
            yield "</td>
                    <td>";
            // line 14
            ((CoreExtension::getAttribute($this->env, $this->source, $context["historique"], "getUtilisateur", [], "any", false, false, false, 14)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["historique"], "getUtilisateur", [], "any", false, false, false, 14), "html", null, true)) : (yield "logement vidé"));
            yield "</td>
                    <td>";
            // line 15
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["historique"], "getCommentaire", [], "any", false, false, false, 15), "html", null, true);
            yield "</td>
                    <td>";
            // line 16
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["historique"], "UtilisateurModif", [], "any", false, false, false, 16), "getNomComplet", [], "any", false, false, false, 16), "html", null, true);
            yield "</td>
                </tr>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['historique'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 19
        yield "            <tr></tr>
        </tbody>
    </table>

</div>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "clients/_popup_history_equipement_utilisateur.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  87 => 19,  78 => 16,  74 => 15,  70 => 14,  66 => 13,  63 => 12,  59 => 11,  49 => 3,  47 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div id=\"popup-history-equipement-utilisateur\" style=\"display:none\" >
    {% set historiqueEquipementUtilisateur = equipement.getHistoriqueEquipementUtilisateurs | sort((a, b) => a.dateHeure > b.dateHeure ? -1 : 1) %}
    <table class=\"table table-striped table-bordered\">
        <thead>
            <th>Date changement</th>
            <th>Utilisateur</th>
            <th>Commentaire</th>
            <th>Modifié par</th>
        </thead>
        <tbody>
            {% for historique in historiqueEquipementUtilisateur %}
               <tr>
                    <td>{{ historique.dateHeure|date('d/m/Y h:m') }}</td>
                    <td>{{ historique.getUtilisateur ? historique.getUtilisateur : 'logement vidé' }}</td>
                    <td>{{ historique.getCommentaire }}</td>
                    <td>{{ historique.UtilisateurModif.getNomComplet }}</td>
                </tr>
            {% endfor %}
            <tr></tr>
        </tbody>
    </table>

</div>", "clients/_popup_history_equipement_utilisateur.html.twig", "/builds/dev/refonte_sav/templates/clients/_popup_history_equipement_utilisateur.html.twig");
    }
}
