<?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;
/* vehicule/index.html.twig */
class __TwigTemplate_f67dc804de2da280e0ad24f895121d0b8147399e55bce370fe4033181c667187 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'navigation' => [$this, 'block_navigation'],
'content' => [$this, 'block_content'],
'script' => [$this, 'block_script'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "Global/layout.html.twig";
}
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", "vehicule/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "vehicule/index.html.twig"));
// line 6
$context["pageTitle"] = "Parking";
// line 1
$this->parent = $this->loadTemplate("Global/layout.html.twig", "vehicule/index.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 4
public function block_title($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(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield "Parking";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 7
public function block_navigation($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(), "block", "navigation"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "navigation"));
// line 8
yield " ";
$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); })())]];
// line 9
yield " ";
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); })())]));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 11
public function block_content($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(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 12
yield "
<section class=\"card mb-3\">
<header class=\"card-header\">
<div class=\"card-actions\">
<a href=\"#\" class=\"card-action card-action-toggle\" data-card-toggle=\"\"></a>
<a href=\"#\" class=\"card-action card-action-dismiss\" data-card-dismiss=\"\"></a>
</div>
<div class=\"card-body\">
<table class=\"table table-striped\" id=\"vehicule\">
<thead>
<tr>
<th>Adherent</th>
<th>Immatriculation</th>
<th>Marque</th>
<th>Modele</th>
<th>Couleur</th>
<th>Parking</th>
<th>Mois début</th>
<th>Mois fin</th>
<th>Action</th>
</tr>
</thead>
<tbody>
";
// line 36
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["vehicule"]) {
// line 37
yield " ";
if ((0 !== CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "moisFin", [], "any", false, false, false, 37), 1))) {
// line 38
yield " <tr>
<td>";
// line 39
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "adherent", [], "any", false, false, false, 39), "nomPrenom", [], "any", false, false, false, 39), "html", null, true);
yield "</td>
<td>";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "immatriculation", [], "any", false, false, false, 40), "html", null, true);
yield "</td>
<td>";
// line 41
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "marque", [], "any", false, false, false, 41), "html", null, true);
yield "</td>
<td>";
// line 42
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "modele", [], "any", false, false, false, 42), "html", null, true);
yield "</td>
<td>";
// line 43
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "couleur", [], "any", false, false, false, 43), "html", null, true);
yield "</td>
";
// line 44
if (CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "parking", [], "any", false, false, false, 44)) {
// line 45
yield " <td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "parking", [], "any", false, false, false, 45), "nom", [], "any", false, false, false, 45), "html", null, true);
yield "</td>
";
} else {
// line 47
yield " <td>-</td>
";
}
// line 49
yield " <td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "moisDebut", [], "any", false, false, false, 49), "html", null, true);
yield "</td>
<td>";
// line 51
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["vehicule"], "moisFin", [], "any", false, false, false, 51), "html", null, true);
yield "</td>
<td><a class=\"btn btn-primary\" href=\"";
// line 52
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", false, false, false, 52)]), "html", null, true);
yield "\">Modifier</a></td>
</tr>
";
}
// line 55
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['vehicule'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 56
yield " </tbody>
<tfoot>
<tr>
<th>Adherent</th>
<th>Immatriculation</th>
<th>Marque</th>
<th>Modele</th>
<th>Couleur</th>
<th>Parking</th>
<th>Mois début</th>
<th>Mois fin</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 77
public function block_script($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(), "block", "script"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "script"));
// line 78
yield "
<script>
\$(document).ready(function () {
\$(\"#vehicule\").DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.13.7/i18n/fr-FR.json',
},
lengthMenu: [
[10, 15, 25, 50, -1],
],
dom: 'Bfrtip',
buttons: [
{
extend: 'pdf',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
}
},
{
extend: 'print',
exportOptions: {
columns: [0, 1]
}
},
'copy', 'csv', 'excel'
],
scrollX: true,
initComplete: function () {
this.api()
.columns()
.every(function () {
let column = this;
let title = column.footer().textContent;
// Create input element
let input = document.createElement('input');
input.placeholder = title;
column.footer().replaceChildren(input);
// Event listener for user input
input.addEventListener('keyup', () => {
if (column.search() !== this.value) {
column.search(input.value).draw();
}
});
});
}
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "vehicule/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends \"Global/layout.html.twig\" %}
{% block title %}Parking{% endblock %}
{% set pageTitle ='Parking'%}
{% block navigation %}
{% set navigation = [{'current': pageTitle}] %}
{% include 'Global/navigation.html.twig' with {navigation: navigation} %}
{% endblock %}
{% block content %}
<section class=\"card mb-3\">
<header class=\"card-header\">
<div class=\"card-actions\">
<a href=\"#\" class=\"card-action card-action-toggle\" data-card-toggle=\"\"></a>
<a href=\"#\" class=\"card-action card-action-dismiss\" data-card-dismiss=\"\"></a>
</div>
<div class=\"card-body\">
<table class=\"table table-striped\" id=\"vehicule\">
<thead>
<tr>
<th>Adherent</th>
<th>Immatriculation</th>
<th>Marque</th>
<th>Modele</th>
<th>Couleur</th>
<th>Parking</th>
<th>Mois début</th>
<th>Mois fin</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for vehicule in vehicules %}
{% if (vehicule.moisFin!=1) %}
<tr>
<td>{{ vehicule.adherent.nomPrenom }}</td>
<td>{{ vehicule.immatriculation }}</td>
<td>{{ vehicule.marque }}</td>
<td>{{ vehicule.modele }}</td>
<td>{{ vehicule.couleur }}</td>
{% if (vehicule.parking) %}
<td>{{ vehicule.parking.nom }}</td>
{% else %}
<td>-</td>
{% endif %}
<td>{{ vehicule.moisDebut }}</td>
<td>{{ vehicule.moisFin }}</td>
<td><a class=\"btn btn-primary\" href=\"{{ path('app_vehicule_edit', {'id': vehicule.id}) }}\">Modifier</a></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
<tfoot>
<tr>
<th>Adherent</th>
<th>Immatriculation</th>
<th>Marque</th>
<th>Modele</th>
<th>Couleur</th>
<th>Parking</th>
<th>Mois début</th>
<th>Mois fin</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</section>
{% endblock %}
{% block script %}
<script>
\$(document).ready(function () {
\$(\"#vehicule\").DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.13.7/i18n/fr-FR.json',
},
lengthMenu: [
[10, 15, 25, 50, -1],
],
dom: 'Bfrtip',
buttons: [
{
extend: 'pdf',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
}
},
{
extend: 'print',
exportOptions: {
columns: [0, 1]
}
},
'copy', 'csv', 'excel'
],
scrollX: true,
initComplete: function () {
this.api()
.columns()
.every(function () {
let column = this;
let title = column.footer().textContent;
// Create input element
let input = document.createElement('input');
input.placeholder = title;
column.footer().replaceChildren(input);
// Event listener for user input
input.addEventListener('keyup', () => {
if (column.search() !== this.value) {
column.search(input.value).draw();
}
});
});
}
});
});
</script>
{% endblock %}", "vehicule/index.html.twig", "/home/amicala/www/Amicale/templates/vehicule/index.html.twig");
}
}