var/cache/dev/twig/b5/b5c1691ef37c0ad70873a5c17515266878f1516c48b24b404318d7912e138eca.php line 42

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* vehicule/index.html.twig */
  15. class __TwigTemplate_f67dc804de2da280e0ad24f895121d0b8147399e55bce370fe4033181c667187 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'title' => [$this'block_title'],
  25.             'navigation' => [$this'block_navigation'],
  26.             'content' => [$this'block_content'],
  27.             'script' => [$this'block_script'],
  28.         ];
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 1
  33.         return "Global/layout.html.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""vehicule/index.html.twig"));
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""vehicule/index.html.twig"));
  42.         // line 6
  43.         $context["pageTitle"] = "Parking";
  44.         // line 1
  45.         $this->parent $this->loadTemplate("Global/layout.html.twig""vehicule/index.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  49.         
  50.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  51.     }
  52.     // line 4
  53.     public function block_title($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  60.         yield "Parking";
  61.         
  62.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  63.         
  64.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  65.         return; yield '';
  66.     }
  67.     // line 7
  68.     public function block_navigation($context, array $blocks = [])
  69.     {
  70.         $macros $this->macros;
  71.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  72.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""navigation"));
  73.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  74.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""navigation"));
  75.         // line 8
  76.         yield "    ";
  77.         $context["navigation"] = [["current" => (isset($context["pageTitle"]) || array_key_exists("pageTitle"$context) ? $context["pageTitle"] : (function () { throw new RuntimeError('Variable "pageTitle" does not exist.'8$this->source); })())]];
  78.         // line 9
  79.         yield "    ";
  80.         yield from         $this->loadTemplate("Global/navigation.html.twig""vehicule/index.html.twig"9)->unwrap()->yield(CoreExtension::merge($context, ["navigation" => (isset($context["navigation"]) || array_key_exists("navigation"$context) ? $context["navigation"] : (function () { throw new RuntimeError('Variable "navigation" does not exist.'9$this->source); })())]));
  81.         
  82.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  83.         
  84.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  85.         return; yield '';
  86.     }
  87.     // line 11
  88.     public function block_content($context, array $blocks = [])
  89.     {
  90.         $macros $this->macros;
  91.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  93.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  95.         // line 12
  96.         yield "
  97.     <section class=\"card mb-3\">
  98.         <header class=\"card-header\">
  99.             <div class=\"card-actions\">
  100.                 <a href=\"#\" class=\"card-action card-action-toggle\" data-card-toggle=\"\"></a>
  101.                 <a href=\"#\" class=\"card-action card-action-dismiss\" data-card-dismiss=\"\"></a>
  102.             </div>              
  103.             <div class=\"card-body\">
  104.                 <table class=\"table table-striped\" id=\"vehicule\">
  105.                     <thead>
  106.                         <tr>
  107.                             <th>Adherent</th>
  108.                             <th>Immatriculation</th>
  109.                             <th>Marque</th>
  110.                             <th>Modele</th>
  111.                             <th>Couleur</th>
  112.                             <th>Parking</th>
  113.                             <th>Mois début</th>
  114.                             <th>Mois fin</th>
  115.                             <th>Action</th>
  116.                         </tr>
  117.                     </thead>
  118.                     <tbody>
  119.                         ";
  120.         // line 36
  121.         $context['_parent'] = $context;
  122.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["vehicules"]) || array_key_exists("vehicules"$context) ? $context["vehicules"] : (function () { throw new RuntimeError('Variable "vehicules" does not exist.'36$this->source); })()));
  123.         foreach ($context['_seq'] as $context["_key"] => $context["vehicule"]) {
  124.             // line 37
  125.             yield "                              ";
  126.             if ((!== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "moisFin", [], "any"falsefalsefalse37), 1))) {
  127.                 // line 38
  128.                 yield "                            <tr>
  129.                                 <td>";
  130.                 // line 39
  131.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["vehicule"], "adherent", [], "any"falsefalsefalse39), "nomPrenom", [], "any"falsefalsefalse39), "html"nulltrue);
  132.                 yield "</td>
  133.                                 <td>";
  134.                 // line 40
  135.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "immatriculation", [], "any"falsefalsefalse40), "html"nulltrue);
  136.                 yield "</td>
  137.                                 <td>";
  138.                 // line 41
  139.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "marque", [], "any"falsefalsefalse41), "html"nulltrue);
  140.                 yield "</td>
  141.                                 <td>";
  142.                 // line 42
  143.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "modele", [], "any"falsefalsefalse42), "html"nulltrue);
  144.                 yield "</td>
  145.                                 <td>";
  146.                 // line 43
  147.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "couleur", [], "any"falsefalsefalse43), "html"nulltrue);
  148.                 yield "</td>
  149.                                 ";
  150.                 // line 44
  151.                 if (CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "parking", [], "any"falsefalsefalse44)) {
  152.                     // line 45
  153.                     yield "                                    <td>";
  154.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["vehicule"], "parking", [], "any"falsefalsefalse45), "nom", [], "any"falsefalsefalse45), "html"nulltrue);
  155.                     yield "</td>
  156.                                 ";
  157.                 } else {
  158.                     // line 47
  159.                     yield "                                    <td>-</td>
  160.                                 ";
  161.                 }
  162.                 // line 49
  163.                 yield "                                <td>";
  164.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "moisDebut", [], "any"falsefalsefalse49), "html"nulltrue);
  165.                 yield "</td>
  166.                                
  167.                                 <td>";
  168.                 // line 51
  169.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "moisFin", [], "any"falsefalsefalse51), "html"nulltrue);
  170.                 yield "</td>
  171.                                 <td><a class=\"btn btn-primary\" href=\"";
  172.                 // line 52
  173.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_vehicule_edit", ["id" => CoreExtension::getAttribute($this->env$this->source$context["vehicule"], "id", [], "any"falsefalsefalse52)]), "html"nulltrue);
  174.                 yield "\">Modifier</a></td>
  175.                             </tr>
  176.                             ";
  177.             }
  178.             // line 55
  179.             yield "                        ";
  180.         }
  181.         $_parent $context['_parent'];
  182.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['vehicule'], $context['_parent'], $context['loop']);
  183.         $context array_intersect_key($context$_parent) + $_parent;
  184.         // line 56
  185.         yield "                    </tbody>
  186.                     <tfoot>
  187.                            <tr>
  188.                             <th>Adherent</th>
  189.                             <th>Immatriculation</th>
  190.                             <th>Marque</th>
  191.                             <th>Modele</th>
  192.                             <th>Couleur</th>
  193.                             <th>Parking</th>
  194.                             <th>Mois début</th>
  195.                             <th>Mois fin</th>
  196.                             <th>Action</th>
  197.                         </tr>
  198.                     </tfoot>
  199.                 </table>
  200.             </div>
  201.     </section>    
  202. ";
  203.         
  204.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  205.         
  206.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  207.         return; yield '';
  208.     }
  209.     // line 77
  210.     public function block_script($context, array $blocks = [])
  211.     {
  212.         $macros $this->macros;
  213.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  214.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""script"));
  215.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  216.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""script"));
  217.         // line 78
  218.         yield "
  219.     <script>
  220.         \$(document).ready(function () {
  221.             \$(\"#vehicule\").DataTable({
  222.                 language: {
  223.                     url: '//cdn.datatables.net/plug-ins/1.13.7/i18n/fr-FR.json',
  224.                 },
  225.                 lengthMenu: [
  226.                     [10, 15, 25, 50, -1],
  227.                 ],
  228.                 dom: 'Bfrtip',
  229.                 buttons: [
  230.                     {
  231.                         extend: 'pdf',
  232.                         exportOptions: {
  233.                             columns: [0, 1, 2, 3, 4, 5]
  234.                         }
  235.                     },
  236.                     {
  237.                         extend: 'print',
  238.                         exportOptions: {
  239.                             columns: [0, 1]
  240.                         }
  241.                     },
  242.                     'copy', 'csv', 'excel'
  243.                 ],
  244.                 scrollX: true,
  245.                 initComplete: function () {
  246.                     this.api()
  247.                             .columns()
  248.                             .every(function () {
  249.                                 let column = this;
  250.                                 let title = column.footer().textContent;
  251.                                 // Create input element
  252.                                 let input = document.createElement('input');
  253.                                 input.placeholder = title;
  254.                                 column.footer().replaceChildren(input);
  255.                                 // Event listener for user input
  256.                                 input.addEventListener('keyup', () => {
  257.                                     if (column.search() !== this.value) {
  258.                                         column.search(input.value).draw();
  259.                                     }
  260.                                 });
  261.                             });
  262.                 }
  263.             });
  264.         });
  265.     </script>
  266. ";
  267.         
  268.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  269.         
  270.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  271.         return; yield '';
  272.     }
  273.     /**
  274.      * @codeCoverageIgnore
  275.      */
  276.     public function getTemplateName()
  277.     {
  278.         return "vehicule/index.html.twig";
  279.     }
  280.     /**
  281.      * @codeCoverageIgnore
  282.      */
  283.     public function isTraitable()
  284.     {
  285.         return false;
  286.     }
  287.     /**
  288.      * @codeCoverageIgnore
  289.      */
  290.     public function getDebugInfo()
  291.     {
  292.         return array (  251 => 78,  241 => 77,  210 => 56,  204 => 55,  198 => 52,  194 => 51,  188 => 49,  184 => 47,  178 => 45,  176 => 44,  172 => 43,  168 => 42,  164 => 41,  160 => 40,  156 => 39,  153 => 38,  150 => 37,  146 => 36,  120 => 12,  110 => 11,  98 => 9,  95 => 8,  85 => 7,  65 => 4,  54 => 1,  52 => 6,  39 => 1,);
  293.     }
  294.     public function getSourceContext()
  295.     {
  296.         return new Source("{% extends \"Global/layout.html.twig\" %}
  297. {% block title %}Parking{% endblock %}
  298. {% set pageTitle ='Parking'%}
  299. {% block navigation %}
  300.     {% set navigation = [{'current': pageTitle}] %}
  301.     {% include 'Global/navigation.html.twig' with {navigation: navigation} %}
  302. {% endblock %}
  303. {% block content %}
  304.     <section class=\"card mb-3\">
  305.         <header class=\"card-header\">
  306.             <div class=\"card-actions\">
  307.                 <a href=\"#\" class=\"card-action card-action-toggle\" data-card-toggle=\"\"></a>
  308.                 <a href=\"#\" class=\"card-action card-action-dismiss\" data-card-dismiss=\"\"></a>
  309.             </div>              
  310.             <div class=\"card-body\">
  311.                 <table class=\"table table-striped\" id=\"vehicule\">
  312.                     <thead>
  313.                         <tr>
  314.                             <th>Adherent</th>
  315.                             <th>Immatriculation</th>
  316.                             <th>Marque</th>
  317.                             <th>Modele</th>
  318.                             <th>Couleur</th>
  319.                             <th>Parking</th>
  320.                             <th>Mois début</th>
  321.                             <th>Mois fin</th>
  322.                             <th>Action</th>
  323.                         </tr>
  324.                     </thead>
  325.                     <tbody>
  326.                         {% for vehicule in vehicules %}
  327.                               {% if  (vehicule.moisFin!=1) %}
  328.                             <tr>
  329.                                 <td>{{ vehicule.adherent.nomPrenom }}</td>
  330.                                 <td>{{ vehicule.immatriculation }}</td>
  331.                                 <td>{{ vehicule.marque }}</td>
  332.                                 <td>{{ vehicule.modele }}</td>
  333.                                 <td>{{ vehicule.couleur }}</td>
  334.                                 {% if  (vehicule.parking) %}
  335.                                     <td>{{ vehicule.parking.nom }}</td>
  336.                                 {% else %}
  337.                                     <td>-</td>
  338.                                 {% endif %}
  339.                                 <td>{{ vehicule.moisDebut }}</td>
  340.                                
  341.                                 <td>{{ vehicule.moisFin }}</td>
  342.                                 <td><a class=\"btn btn-primary\" href=\"{{ path('app_vehicule_edit', {'id': vehicule.id}) }}\">Modifier</a></td>
  343.                             </tr>
  344.                             {% endif %}
  345.                         {% endfor %}
  346.                     </tbody>
  347.                     <tfoot>
  348.                            <tr>
  349.                             <th>Adherent</th>
  350.                             <th>Immatriculation</th>
  351.                             <th>Marque</th>
  352.                             <th>Modele</th>
  353.                             <th>Couleur</th>
  354.                             <th>Parking</th>
  355.                             <th>Mois début</th>
  356.                             <th>Mois fin</th>
  357.                             <th>Action</th>
  358.                         </tr>
  359.                     </tfoot>
  360.                 </table>
  361.             </div>
  362.     </section>    
  363. {% endblock %}
  364. {% block script %}
  365.     <script>
  366.         \$(document).ready(function () {
  367.             \$(\"#vehicule\").DataTable({
  368.                 language: {
  369.                     url: '//cdn.datatables.net/plug-ins/1.13.7/i18n/fr-FR.json',
  370.                 },
  371.                 lengthMenu: [
  372.                     [10, 15, 25, 50, -1],
  373.                 ],
  374.                 dom: 'Bfrtip',
  375.                 buttons: [
  376.                     {
  377.                         extend: 'pdf',
  378.                         exportOptions: {
  379.                             columns: [0, 1, 2, 3, 4, 5]
  380.                         }
  381.                     },
  382.                     {
  383.                         extend: 'print',
  384.                         exportOptions: {
  385.                             columns: [0, 1]
  386.                         }
  387.                     },
  388.                     'copy', 'csv', 'excel'
  389.                 ],
  390.                 scrollX: true,
  391.                 initComplete: function () {
  392.                     this.api()
  393.                             .columns()
  394.                             .every(function () {
  395.                                 let column = this;
  396.                                 let title = column.footer().textContent;
  397.                                 // Create input element
  398.                                 let input = document.createElement('input');
  399.                                 input.placeholder = title;
  400.                                 column.footer().replaceChildren(input);
  401.                                 // Event listener for user input
  402.                                 input.addEventListener('keyup', () => {
  403.                                     if (column.search() !== this.value) {
  404.                                         column.search(input.value).draw();
  405.                                     }
  406.                                 });
  407.                             });
  408.                 }
  409.             });
  410.         });
  411.     </script>
  412. {% endblock %}""vehicule/index.html.twig""/home/amicala/www/Amicale/templates/vehicule/index.html.twig");
  413.     }
  414. }