<?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;
use Twig\TemplateWrapper;
/* classroom/index.html.twig */
class __TwigTemplate_f823ab9d18e428be626d570c6bea4d2f extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout/backEndLayout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/index.html.twig"));
$this->parent = $this->load("layout/backEndLayout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 4
yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
yield "
<style>
/* ── Tokens locaux ─────────────────────────────────────────── */
:root {
--ci-bg : #f5f7fa;
--ci-card : #ffffff;
--ci-border : rgba(0,0,0,.08);
--ci-border-hi: rgba(0,0,0,.16);
--ci-ink : #111827;
--ci-dim : #4b5563;
--ci-muted : #9ca3af;
--ci-blue : #1d4ed8;
--ci-blue-lt : rgba(29,78,216,.1);
--ci-teal : #0d9488;
--ci-teal-lt : rgba(13,148,136,.1);
--ci-amber : #b45309;
--ci-amber-lt : rgba(180,83,9,.1);
--ci-rose : #be123c;
--ci-rose-lt : rgba(190,18,60,.1);
--ci-r : 12px;
--ci-rs : 8px;
--ci-shadow : 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
}
/* ── Layout page ───────────────────────────────────────────── */
.ci-page { font-family:'DM Sans','Segoe UI',sans-serif; }
/* ── Barre de tête ─────────────────────────────────────────── */
.ci-topbar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 24px;
}
.ci-topbar__title {
font-size: 20px;
font-weight: 700;
color: var(--ci-ink);
display: flex;
align-items: center;
gap: 10px;
}
.ci-topbar__title i { color: var(--ci-blue); font-size: 18px; }
.ci-topbar__sub { font-size: 13px; color: var(--ci-muted); margin-top: 2px; }
/* ── Statistiques globales ─────────────────────────────────── */
.ci-stats {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 12px;
margin-bottom: 24px;
}
.ci-stat {
background: var(--ci-card);
border: 1px solid var(--ci-border);
border-radius: var(--ci-r);
padding: 16px;
display: flex;
align-items: center;
gap: 12px;
transition: box-shadow .2s;
}
.ci-stat:hover { box-shadow: var(--ci-shadow); }
.ci-stat__icon {
width: 40px; height: 40px;
border-radius: var(--ci-rs);
display: flex; align-items: center; justify-content: center;
font-size: 16px; flex-shrink: 0;
}
.ic-blue { background: var(--ci-blue-lt); color: var(--ci-blue); }
.ic-teal { background: var(--ci-teal-lt); color: var(--ci-teal); }
.ic-amber { background: var(--ci-amber-lt); color: var(--ci-amber); }
.ic-rose { background: var(--ci-rose-lt); color: var(--ci-rose); }
.ci-stat__val { font-size: 22px; font-weight: 700; color: var(--ci-ink); line-height: 1; }
.ci-stat__lbl { font-size: 11.5px; color: var(--ci-muted); margin-top: 2px; }
/* ── Tableau ───────────────────────────────────────────────── */
.ci-table-card {
background: var(--ci-card);
border: 1px solid var(--ci-border);
border-radius: var(--ci-r);
overflow: hidden;
box-shadow: var(--ci-shadow);
}
.ci-table-head {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 16px 20px;
border-bottom: 1px solid var(--ci-border);
background: #fafbfc;
}
.ci-table-head__title {
font-size: 14px;
font-weight: 600;
color: var(--ci-ink);
display: flex;
align-items: center;
gap: 8px;
}
.ci-table-head__dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--ci-blue);
box-shadow: 0 0 6px var(--ci-blue);
}
/* Bouton ajouter */
.btn-add {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: var(--ci-blue);
color: #fff;
border-radius: var(--ci-rs);
font-size: 13px;
font-weight: 600;
text-decoration: none;
border: none;
cursor: pointer;
transition: background .18s, transform .14s;
}
.btn-add:hover { background: #1e40af; color: #fff; transform: translateY(-1px); }
/* Table */
table.ci-tbl {
width: 100%;
border-collapse: collapse;
font-size: 13.5px;
}
table.ci-tbl thead th {
padding: 10px 16px;
color: var(--ci-muted);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .06em;
background: #fafbfc;
border-bottom: 1px solid var(--ci-border);
white-space: nowrap;
}
table.ci-tbl tbody td {
padding: 12px 16px;
border-bottom: 1px solid rgba(0,0,0,.04);
color: var(--ci-ink);
vertical-align: middle;
}
table.ci-tbl tbody tr:last-child td { border-bottom: none; }
table.ci-tbl tbody tr { transition: background .12s; }
table.ci-tbl tbody tr:hover td { background: rgba(29,78,216,.03); }
/* Nom de la classe */
.room-name {
font-weight: 700;
font-size: 14px;
color: var(--ci-ink);
}
.room-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--ci-ink);
text-decoration: none;
}
.room-link:hover { color: var(--ci-blue); }
.room-link:hover .room-name { text-decoration: underline; }
/* Niveau badge */
.level-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 20px;
font-size: 11.5px;
font-weight: 600;
background: var(--ci-blue-lt);
color: var(--ci-blue);
border: 1px solid rgba(29,78,216,.2);
}
/* Séquence active */
.seq-badge {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 10px;
border-radius: 20px;
font-size: 11px;
font-weight: 500;
background: var(--ci-teal-lt);
color: var(--ci-teal);
border: 1px solid rgba(13,148,136,.2);
}
.seq-dot {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--ci-teal);
animation: pulse-dot 1.6s ease infinite;
}
@keyframes pulse-dot {
0%,100% { opacity:1; } 50% { opacity:.35; }
}
/* Prof titulaire */
.main-teacher {
display: flex;
align-items: center;
gap: 7px;
font-size: 13px;
}
.teacher-avatar {
width: 26px; height: 26px;
border-radius: 50%;
background: linear-gradient(135deg, #1d4ed8, #0d9488);
color: #fff;
font-size: 10px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.no-teacher {
font-size: 12px;
color: var(--ci-rose);
font-style: italic;
}
/* Boutons action ligne */
.ci-actions {
display: flex;
align-items: center;
gap: 4px;
justify-content: flex-end;
}
.ci-btn {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 5px 10px;
border-radius: 7px;
font-size: 11.5px;
font-weight: 500;
text-decoration: none;
border: 1px solid var(--ci-border);
cursor: pointer;
background: #fff;
color: var(--ci-dim);
transition: background .15s, border-color .15s, color .15s;
white-space: nowrap;
}
.ci-btn:hover { border-color: var(--ci-border-hi); color: var(--ci-ink); background: #f8f9fa; }
.ci-btn-primary { background: var(--ci-blue-lt); color: var(--ci-blue); border-color: rgba(29,78,216,.25); }
.ci-btn-primary:hover { background: #1d4ed8; color: #fff; }
.ci-btn-warning { background: var(--ci-amber-lt); color: var(--ci-amber); border-color: rgba(180,83,9,.25); }
.ci-btn-warning:hover { background: #b45309; color: #fff; }
.ci-btn-danger { background: var(--ci-rose-lt); color: var(--ci-rose); border-color: rgba(190,18,60,.25); }
.ci-btn-danger:hover { background: #be123c; color: #fff; }
/* ── Pagination ────────────────────────────────────────────── */
.ci-pagination {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 14px 20px;
border-top: 1px solid var(--ci-border);
background: #fafbfc;
}
.ci-pagination__info { font-size: 12.5px; color: var(--ci-muted); }
.ci-pager {
display: flex;
align-items: center;
gap: 4px;
list-style: none;
margin: 0; padding: 0;
}
.ci-pager li a,
.ci-pager li span {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
height: 34px;
padding: 0 8px;
border-radius: 8px;
border: 1px solid var(--ci-border);
font-size: 13px;
font-weight: 500;
color: var(--ci-dim);
text-decoration: none;
background: #fff;
transition: background .15s, border-color .15s, color .15s;
}
.ci-pager li a:hover { border-color: var(--ci-blue); color: var(--ci-blue); }
.ci-pager li.active span {
background: var(--ci-blue);
color: #fff;
border-color: var(--ci-blue);
font-weight: 700;
}
.ci-pager li.disabled span { opacity: .4; cursor: default; }
/* ── Vide ──────────────────────────────────────────────────── */
.ci-empty {
text-align: center;
padding: 64px 24px;
color: var(--ci-muted);
}
.ci-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.ci-empty strong { display: block; font-size: 15px; color: var(--ci-dim); margin-bottom: 4px; }
/* ── Animation ─────────────────────────────────────────────── */
@keyframes fadeUp {
from { opacity:0; transform:translateY(10px); }
to { opacity:1; transform:none; }
}
.ci-table-card { animation: fadeUp .4s ease both; }
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 330
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 331
yield "<div class=\"container mt-4\">
<div class=\"d-flex justify-content-between align-items-center mb-3\">
<h4 class=\"text-uppercase\">Liste des salles de classe</h4>
";
// line 335
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 336
yield " <a class=\"btn btn-info\" href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
yield "\">
<i class=\"fa fa-plus\"></i> Ajouter
</a>
";
}
// line 340
yield " </div>
<!-- Level Tabs -->
<ul class=\"nav nav-tabs\" id=\"levelTabs\" role=\"tablist\">
";
// line 344
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["levels"]) || array_key_exists("levels", $context) ? $context["levels"] : (function () { throw new RuntimeError('Variable "levels" does not exist.', 344, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["level"]) {
// line 345
yield " <li class=\"nav-item\" role=\"presentation\">
<button class=\"nav-link ";
// line 346
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 346)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "active";
}
yield "\" id=\"level-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "id", [], "any", false, false, false, 346), "html", null, true);
yield "-tab\"
data-bs-toggle=\"tab\" data-bs-target=\"#level-";
// line 347
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "id", [], "any", false, false, false, 347), "html", null, true);
yield "\" type=\"button\"
role=\"tab\" aria-controls=\"level-";
// line 348
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "id", [], "any", false, false, false, 348), "html", null, true);
yield "\" aria-selected=\"";
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 348)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("true") : ("false"));
yield "\">
";
// line 349
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "fullName", [], "any", false, false, false, 349), "html", null, true);
yield "
</button>
</li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['level'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 353
yield " </ul>
<!-- Classes per Level -->
<div class=\"tab-content mt-3\" id=\"levelTabsContent\">
";
// line 357
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["levels"]) || array_key_exists("levels", $context) ? $context["levels"] : (function () { throw new RuntimeError('Variable "levels" does not exist.', 357, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["level"]) {
// line 358
yield " <div class=\"tab-pane fade ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 358)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "show active";
}
yield "\" id=\"level-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "id", [], "any", false, false, false, 358), "html", null, true);
yield "\" role=\"tabpanel\">
";
// line 359
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["level"], "rooms", [], "any", false, false, false, 359)) > 0)) {
// line 360
yield " <!-- Random Color Header -->
";
// line 362
$context["colors"] = ["#ff7a00", "#2f2f2f", "#28a745", "#009688", "#6f42c1"];
// line 363
$context["color"] = Twig\Extension\CoreExtension::random($this->env->getCharset(), (isset($context["colors"]) || array_key_exists("colors", $context) ? $context["colors"] : (function () { throw new RuntimeError('Variable "colors" does not exist.', 363, $this->source); })()));
// line 364
yield "
<div class=\"level-header\" style=\"background-color: ";
// line 365
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["color"]) || array_key_exists("color", $context) ? $context["color"] : (function () { throw new RuntimeError('Variable "color" does not exist.', 365, $this->source); })()), "html", null, true);
yield ";\">
<h5 class=\"m-0 text-white text-uppercase fw-bold level-title\">
";
// line 367
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "fullName", [], "any", false, false, false, 367), "html", null, true);
yield "
</h5>
</div>
<div class=\"classroom-grid mt-3\">
";
// line 373
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "rooms", [], "any", false, false, false, 373));
foreach ($context['_seq'] as $context["_key"] => $context["room"]) {
// line 374
yield " <div class=\"classroom-card shadow-sm\">
<div class=\"card-header mb-2\">
<h5 class=\"mb-1 classroom-title\">
<a href=\"";
// line 377
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 377)]), "html", null, true);
yield "\">
";
// line 378
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["room"], "name", [], "any", false, false, false, 378), "html", null, true);
yield "
</a>
</h5>
";
// line 382
if (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 382), Twig\Extension\CoreExtension::keys((isset($context["mainTeachers"]) || array_key_exists("mainTeachers", $context) ? $context["mainTeachers"] : (function () { throw new RuntimeError('Variable "mainTeachers" does not exist.', 382, $this->source); })())))) {
// line 383
yield " <small class=\"text-muted\">
<i class=\"fa fa-user\"></i> ";
// line 384
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainTeachers"]) || array_key_exists("mainTeachers", $context) ? $context["mainTeachers"] : (function () { throw new RuntimeError('Variable "mainTeachers" does not exist.', 384, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 384), [], "array", false, false, false, 384), "fullName", [], "any", false, false, false, 384), "html", null, true);
yield "
</small>
";
} else {
// line 387
yield " <small class=\"text-danger\">— Pas de titulaire —</small>
";
}
// line 389
yield " </div>
<!-- Flex Buttons -->
<div class=\"card-actions mt-3\">
";
// line 393
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 394
yield " <a class=\"btn btn-outline-warning\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 394)]), "html", null, true);
yield "\">
<i class=\"fa fa-edit\"></i> Modifier
</a>
<a class=\"btn btn-outline-dark\" target=\"_blank\" href=\"";
// line 397
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classroom_insolvent", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 397)]), "html", null, true);
yield "\">
<i class=\"fa fa-users\"></i> Débiteurs
</a>
<a class=\"btn btn-outline-success\" target=\"_blank\" href=\"";
// line 400
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_payment_plan_print", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 400)]), "html", null, true);
yield "\">
<i class=\"fa fa-money\"></i> Échéancier
</a>
";
}
// line 404
yield "
<a class=\"btn btn-outline-danger\" target=\"_blank\" href=\"";
// line 405
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_fichesimple", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 405)]), "html", null, true);
yield "\">
<i class=\"fa fa-file-pdf-o\"></i> Notes
</a>
<a class=\"btn btn-outline-info\" target=\"_blank\" href=\"";
// line 408
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_presentation", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 408)]), "html", null, true);
yield "\">
<i class=\"fa fa-users\"></i> Présentation
</a>
<a class=\"btn btn-outline-primary\" target=\"_blank\" href=\"";
// line 411
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif", ["room" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 411), "seq" => (isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 411, $this->source); })())]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i> Récap.
</a>
<a class=\"btn btn-outline-secondary\" target=\"_blank\" href=\"";
// line 414
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_disciplinary_record", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 414)]), "html", null, true);
yield "\">
<i class=\"fa fa-th-list\"></i> Discipline
</a>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['room'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 420
yield " </div>
";
} else {
// line 422
yield " <div class=\"alert alert-warning mt-3\">Aucune classe trouvée pour ce niveau.</div>
";
}
// line 424
yield "
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['level'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 427
yield " </div>
<div class=\"ci-page\">
";
// line 431
yield " <div class=\"ci-topbar\">
<div>
<div class=\"ci-topbar__title\">
<i class=\"fa fa-th-large\"></i>
Classes
</div>
<div class=\"ci-topbar__sub\">
Gestion des classes — ";
// line 438
if ((($tmp = (isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 438, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "Année scolaire ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 438, $this->source); })()), "code", [], "any", false, false, false, 438), "html", null, true);
}
// line 439
yield " ";
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 439, $this->source); })()) > 0)) {
yield " · Séquence active";
}
// line 440
yield " </div>
</div>
";
// line 442
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 443
yield " <a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
yield "\" class=\"btn-add\">
<i class=\"fa fa-plus\"></i> Nouvelle classe
</a>
";
}
// line 447
yield " </div>
";
// line 450
yield " <div class=\"ci-stats\">
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
<div>
<div class=\"ci-stat__val\">";
// line 454
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 454, $this->source); })())), "html", null, true);
yield "</div>
<div class=\"ci-stat__lbl\">Classes</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
<div>
<div class=\"ci-stat__val\">";
// line 461
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->students(), "html", null, true);
yield "</div>
<div class=\"ci-stat__lbl\">Élèves inscrits</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
<div>
<div class=\"ci-stat__val\">";
// line 468
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->teachers(), "html", null, true);
yield "</div>
<div class=\"ci-stat__lbl\">Enseignants</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
<div>
<div class=\"ci-stat__val\">";
// line 475
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->rooms(), "html", null, true);
yield "</div>
<div class=\"ci-stat__lbl\">Salles actives</div>
</div>
</div>
</div>
";
// line 482
yield " ";
$context["items_per_page"] = 12;
// line 483
yield " ";
$context["current_page"] = $this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 483, $this->source); })()), "request", [], "any", false, false, false, 483), "query", [], "any", false, false, false, 483), "get", ["page", 1], "method", false, false, false, 483));
// line 484
yield " ";
$context["total_pages"] = Twig\Extension\CoreExtension::round((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 484, $this->source); })())) / (isset($context["items_per_page"]) || array_key_exists("items_per_page", $context) ? $context["items_per_page"] : (function () { throw new RuntimeError('Variable "items_per_page" does not exist.', 484, $this->source); })())), 0, "ceil");
// line 485
yield "
<div class=\"ci-table-card\">
<div class=\"ci-table-head\">
<div class=\"ci-table-head__title\">
<span class=\"ci-table-head__dot\"></span>
Liste des classes
<span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">(";
// line 491
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 491, $this->source); })())), "html", null, true);
yield " au total)</span>
</div>
<div style=\"display:flex;gap:8px;align-items:center;\">
<span class=\"seq-badge\">
<span class=\"seq-dot\"></span>
";
// line 496
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 496, $this->source); })()) > 0)) {
yield "Séquence active";
} else {
yield "Aucune séquence active";
}
// line 497
yield " </span>
</div>
</div>
";
// line 501
if (Twig\Extension\CoreExtension::testEmpty((isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 501, $this->source); })()))) {
// line 502
yield " <div class=\"ci-empty\">
<i class=\"fa fa-inbox\"></i>
<strong>Aucune classe enregistrée</strong>
Commencez par créer une classe.
</div>
";
} else {
// line 508
yield " <div style=\"overflow-x:auto;\">
<table class=\"ci-tbl\">
<thead>
<tr>
<th style=\"width:4%\">#</th>
<th style=\"width:18%\">Classe</th>
<th style=\"width:12%\">Niveau</th>
<th style=\"width:22%\">Professeur titulaire</th>
<th style=\"width:10%\" class=\"text-center\">Modules</th>
<th style=\"width:10%\" class=\"text-center\">Matières</th>
<th style=\"width:24%\" class=\"text-right\">Actions</th>
</tr>
</thead>
<tbody>
";
// line 522
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 522, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["classroom"]) {
// line 523
yield " ";
// line 524
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 524) > (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 524, $this->source); })()) - 1) * (isset($context["items_per_page"]) || array_key_exists("items_per_page", $context) ? $context["items_per_page"] : (function () { throw new RuntimeError('Variable "items_per_page" does not exist.', 524, $this->source); })()))) && (CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 524) <= ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 524, $this->source); })()) * (isset($context["items_per_page"]) || array_key_exists("items_per_page", $context) ? $context["items_per_page"] : (function () { throw new RuntimeError('Variable "items_per_page" does not exist.', 524, $this->source); })()))))) {
// line 525
yield " <tr>
<td style=\"color:var(--ci-muted);font-size:12px\">";
// line 526
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 526, $this->source); })()) - 1) * (isset($context["items_per_page"]) || array_key_exists("items_per_page", $context) ? $context["items_per_page"] : (function () { throw new RuntimeError('Variable "items_per_page" does not exist.', 526, $this->source); })())) + CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 526)) - (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 526, $this->source); })()) - 1) * (isset($context["items_per_page"]) || array_key_exists("items_per_page", $context) ? $context["items_per_page"] : (function () { throw new RuntimeError('Variable "items_per_page" does not exist.', 526, $this->source); })()))), "html", null, true);
yield "</td>
<td>
<a href=\"";
// line 529
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 529)]), "html", null, true);
yield "\" class=\"room-link\">
<span class=\"room-name\">";
// line 530
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "name", [], "any", false, false, false, 530), "html", null, true);
yield "</span>
</a>
</td>
<td>
<span class=\"level-badge\">";
// line 535
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "level", [], "any", false, false, false, 535), "html", null, true);
yield "</span>
</td>
<td>
";
// line 539
if (CoreExtension::getAttribute($this->env, $this->source, ($context["mainTeachers"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 539), [], "array", true, true, false, 539)) {
// line 540
yield " <div class=\"main-teacher\">
<div class=\"teacher-avatar\">
";
// line 542
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainTeachers"]) || array_key_exists("mainTeachers", $context) ? $context["mainTeachers"] : (function () { throw new RuntimeError('Variable "mainTeachers" does not exist.', 542, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 542), [], "array", false, false, false, 542), "fullName", [], "any", false, false, false, 542), 0, 1)), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), Twig\Extension\CoreExtension::slice($this->env->getCharset(), Twig\Extension\CoreExtension::last($this->env->getCharset(), Twig\Extension\CoreExtension::split($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainTeachers"]) || array_key_exists("mainTeachers", $context) ? $context["mainTeachers"] : (function () { throw new RuntimeError('Variable "mainTeachers" does not exist.', 542, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 542), [], "array", false, false, false, 542), "fullName", [], "any", false, false, false, 542), " ")), 0, 1)), "html", null, true);
yield "
</div>
";
// line 544
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainTeachers"]) || array_key_exists("mainTeachers", $context) ? $context["mainTeachers"] : (function () { throw new RuntimeError('Variable "mainTeachers" does not exist.', 544, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 544), [], "array", false, false, false, 544), "fullName", [], "any", false, false, false, 544), "html", null, true);
yield "
</div>
";
} else {
// line 547
yield " <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
";
}
// line 549
yield " </td>
<td class=\"text-center\">
<span style=\"font-weight:600;color:var(--ci-blue)\">";
// line 552
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "modules", [], "any", false, false, false, 552)), "html", null, true);
yield "</span>
</td>
<td class=\"text-center\">
";
// line 556
$context["total_courses"] = 0;
// line 557
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "modules", [], "any", false, false, false, 557));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 558
yield " ";
$context["total_courses"] = ((isset($context["total_courses"]) || array_key_exists("total_courses", $context) ? $context["total_courses"] : (function () { throw new RuntimeError('Variable "total_courses" does not exist.', 558, $this->source); })()) + Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 558)));
// line 559
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 560
yield " <span style=\"font-weight:600;color:var(--ci-teal)\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["total_courses"]) || array_key_exists("total_courses", $context) ? $context["total_courses"] : (function () { throw new RuntimeError('Variable "total_courses" does not exist.', 560, $this->source); })()), "html", null, true);
yield "</span>
</td>
<td>
<div class=\"ci-actions\">
<a class=\"ci-btn ci-btn-primary\" href=\"";
// line 565
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 565)]), "html", null, true);
yield "\" title=\"Voir\">
<i class=\"fa fa-eye\"></i> Voir
</a>
";
// line 568
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 569
yield " <a class=\"ci-btn ci-btn-warning\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 569)]), "html", null, true);
yield "\" title=\"Modifier\">
<i class=\"fa fa-pencil\"></i>
</a>
";
// line 572
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 572, $this->source); })()) > 0)) {
// line 573
yield " <a class=\"ci-btn\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif", ["room" => CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 573), "seq" => (isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 573, $this->source); })())]), "html", null, true);
yield "\" title=\"Récapitulatif PDF\">
<i class=\"fa fa-file-pdf-o\"></i>
</a>
";
}
// line 577
yield " <form method=\"post\" action=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_delete", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 577)]), "html", null, true);
yield "\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
<input type=\"hidden\" name=\"_method\" value=\"DELETE\">
<button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
<i class=\"fa fa-trash\"></i>
</button>
</form>
";
}
// line 584
yield " </div>
</td>
</tr>
";
}
// line 588
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['classroom'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 589
yield " </tbody>
</table>
</div>
";
// line 594
yield " ";
if (((isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 594, $this->source); })()) > 1)) {
// line 595
yield " <div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">
Page ";
// line 597
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 597, $this->source); })()), "html", null, true);
yield " sur ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 597, $this->source); })()), "html", null, true);
yield " — ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 597, $this->source); })())), "html", null, true);
yield " classe";
yield (((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 597, $this->source); })())) > 1)) ? ("s") : (""));
yield "
</div>
<ul class=\"ci-pager\">
<li class=\"";
// line 600
yield ((((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 600, $this->source); })()) <= 1)) ? ("disabled") : (""));
yield "\">
";
// line 601
if (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 601, $this->source); })()) > 1)) {
// line 602
yield " <a href=\"?page=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 602, $this->source); })()) - 1), "html", null, true);
yield "\"><i class=\"fa fa-chevron-left\"></i></a>
";
} else {
// line 604
yield " <span><i class=\"fa fa-chevron-left\"></i></span>
";
}
// line 606
yield " </li>
";
// line 607
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(range(1, (isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 607, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 608
yield " ";
if (($context["p"] == (isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 608, $this->source); })()))) {
// line 609
yield " <li class=\"active\"><span>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "</span></li>
";
} elseif (((( // line 610
$context["p"] == 1) || ($context["p"] == (isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 610, $this->source); })()))) || (($context["p"] >= ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 610, $this->source); })()) - 2)) && ($context["p"] <= ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 610, $this->source); })()) + 2))))) {
// line 611
yield " <li><a href=\"?page=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "</a></li>
";
} elseif ((( // line 612
$context["p"] == ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 612, $this->source); })()) - 3)) || ($context["p"] == ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 612, $this->source); })()) + 3)))) {
// line 613
yield " <li><span style=\"border:none;background:transparent\">…</span></li>
";
}
// line 615
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 616
yield " <li class=\"";
yield ((((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 616, $this->source); })()) >= (isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 616, $this->source); })()))) ? ("disabled") : (""));
yield "\">
";
// line 617
if (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 617, $this->source); })()) < (isset($context["total_pages"]) || array_key_exists("total_pages", $context) ? $context["total_pages"] : (function () { throw new RuntimeError('Variable "total_pages" does not exist.', 617, $this->source); })()))) {
// line 618
yield " <a href=\"?page=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 618, $this->source); })()) + 1), "html", null, true);
yield "\"><i class=\"fa fa-chevron-right\"></i></a>
";
} else {
// line 620
yield " <span><i class=\"fa fa-chevron-right\"></i></span>
";
}
// line 622
yield " </li>
</ul>
</div>
";
} else {
// line 626
yield " <div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">";
// line 627
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 627, $this->source); })())), "html", null, true);
yield " classe";
yield (((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 627, $this->source); })())) > 1)) ? ("s") : (""));
yield " au total</div>
</div>
";
}
// line 630
yield "
";
}
// line 632
yield " </div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "classroom/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1112 => 632, 1108 => 630, 1100 => 627, 1097 => 626, 1091 => 622, 1087 => 620, 1081 => 618, 1079 => 617, 1074 => 616, 1068 => 615, 1064 => 613, 1062 => 612, 1055 => 611, 1053 => 610, 1048 => 609, 1045 => 608, 1041 => 607, 1038 => 606, 1034 => 604, 1028 => 602, 1026 => 601, 1022 => 600, 1010 => 597, 1006 => 595, 1003 => 594, 997 => 589, 983 => 588, 977 => 584, 966 => 577, 958 => 573, 956 => 572, 949 => 569, 947 => 568, 941 => 565, 932 => 560, 926 => 559, 923 => 558, 918 => 557, 916 => 556, 909 => 552, 904 => 549, 900 => 547, 894 => 544, 888 => 542, 884 => 540, 882 => 539, 875 => 535, 867 => 530, 863 => 529, 857 => 526, 854 => 525, 851 => 524, 849 => 523, 832 => 522, 816 => 508, 808 => 502, 806 => 501, 800 => 497, 794 => 496, 786 => 491, 778 => 485, 775 => 484, 772 => 483, 769 => 482, 760 => 475, 750 => 468, 740 => 461, 730 => 454, 724 => 450, 720 => 447, 712 => 443, 710 => 442, 706 => 440, 701 => 439, 696 => 438, 687 => 431, 682 => 427, 666 => 424, 662 => 422, 658 => 420, 646 => 414, 640 => 411, 634 => 408, 628 => 405, 625 => 404, 618 => 400, 612 => 397, 605 => 394, 603 => 393, 597 => 389, 593 => 387, 587 => 384, 584 => 383, 582 => 382, 575 => 378, 571 => 377, 566 => 374, 562 => 373, 553 => 367, 548 => 365, 545 => 364, 543 => 363, 541 => 362, 538 => 360, 536 => 359, 527 => 358, 510 => 357, 504 => 353, 486 => 349, 480 => 348, 476 => 347, 468 => 346, 465 => 345, 448 => 344, 442 => 340, 434 => 336, 432 => 335, 426 => 331, 413 => 330, 77 => 4, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'layout/backEndLayout.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<style>
/* ── Tokens locaux ─────────────────────────────────────────── */
:root {
--ci-bg : #f5f7fa;
--ci-card : #ffffff;
--ci-border : rgba(0,0,0,.08);
--ci-border-hi: rgba(0,0,0,.16);
--ci-ink : #111827;
--ci-dim : #4b5563;
--ci-muted : #9ca3af;
--ci-blue : #1d4ed8;
--ci-blue-lt : rgba(29,78,216,.1);
--ci-teal : #0d9488;
--ci-teal-lt : rgba(13,148,136,.1);
--ci-amber : #b45309;
--ci-amber-lt : rgba(180,83,9,.1);
--ci-rose : #be123c;
--ci-rose-lt : rgba(190,18,60,.1);
--ci-r : 12px;
--ci-rs : 8px;
--ci-shadow : 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
}
/* ── Layout page ───────────────────────────────────────────── */
.ci-page { font-family:'DM Sans','Segoe UI',sans-serif; }
/* ── Barre de tête ─────────────────────────────────────────── */
.ci-topbar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 24px;
}
.ci-topbar__title {
font-size: 20px;
font-weight: 700;
color: var(--ci-ink);
display: flex;
align-items: center;
gap: 10px;
}
.ci-topbar__title i { color: var(--ci-blue); font-size: 18px; }
.ci-topbar__sub { font-size: 13px; color: var(--ci-muted); margin-top: 2px; }
/* ── Statistiques globales ─────────────────────────────────── */
.ci-stats {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 12px;
margin-bottom: 24px;
}
.ci-stat {
background: var(--ci-card);
border: 1px solid var(--ci-border);
border-radius: var(--ci-r);
padding: 16px;
display: flex;
align-items: center;
gap: 12px;
transition: box-shadow .2s;
}
.ci-stat:hover { box-shadow: var(--ci-shadow); }
.ci-stat__icon {
width: 40px; height: 40px;
border-radius: var(--ci-rs);
display: flex; align-items: center; justify-content: center;
font-size: 16px; flex-shrink: 0;
}
.ic-blue { background: var(--ci-blue-lt); color: var(--ci-blue); }
.ic-teal { background: var(--ci-teal-lt); color: var(--ci-teal); }
.ic-amber { background: var(--ci-amber-lt); color: var(--ci-amber); }
.ic-rose { background: var(--ci-rose-lt); color: var(--ci-rose); }
.ci-stat__val { font-size: 22px; font-weight: 700; color: var(--ci-ink); line-height: 1; }
.ci-stat__lbl { font-size: 11.5px; color: var(--ci-muted); margin-top: 2px; }
/* ── Tableau ───────────────────────────────────────────────── */
.ci-table-card {
background: var(--ci-card);
border: 1px solid var(--ci-border);
border-radius: var(--ci-r);
overflow: hidden;
box-shadow: var(--ci-shadow);
}
.ci-table-head {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 16px 20px;
border-bottom: 1px solid var(--ci-border);
background: #fafbfc;
}
.ci-table-head__title {
font-size: 14px;
font-weight: 600;
color: var(--ci-ink);
display: flex;
align-items: center;
gap: 8px;
}
.ci-table-head__dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--ci-blue);
box-shadow: 0 0 6px var(--ci-blue);
}
/* Bouton ajouter */
.btn-add {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: var(--ci-blue);
color: #fff;
border-radius: var(--ci-rs);
font-size: 13px;
font-weight: 600;
text-decoration: none;
border: none;
cursor: pointer;
transition: background .18s, transform .14s;
}
.btn-add:hover { background: #1e40af; color: #fff; transform: translateY(-1px); }
/* Table */
table.ci-tbl {
width: 100%;
border-collapse: collapse;
font-size: 13.5px;
}
table.ci-tbl thead th {
padding: 10px 16px;
color: var(--ci-muted);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .06em;
background: #fafbfc;
border-bottom: 1px solid var(--ci-border);
white-space: nowrap;
}
table.ci-tbl tbody td {
padding: 12px 16px;
border-bottom: 1px solid rgba(0,0,0,.04);
color: var(--ci-ink);
vertical-align: middle;
}
table.ci-tbl tbody tr:last-child td { border-bottom: none; }
table.ci-tbl tbody tr { transition: background .12s; }
table.ci-tbl tbody tr:hover td { background: rgba(29,78,216,.03); }
/* Nom de la classe */
.room-name {
font-weight: 700;
font-size: 14px;
color: var(--ci-ink);
}
.room-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--ci-ink);
text-decoration: none;
}
.room-link:hover { color: var(--ci-blue); }
.room-link:hover .room-name { text-decoration: underline; }
/* Niveau badge */
.level-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 20px;
font-size: 11.5px;
font-weight: 600;
background: var(--ci-blue-lt);
color: var(--ci-blue);
border: 1px solid rgba(29,78,216,.2);
}
/* Séquence active */
.seq-badge {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 10px;
border-radius: 20px;
font-size: 11px;
font-weight: 500;
background: var(--ci-teal-lt);
color: var(--ci-teal);
border: 1px solid rgba(13,148,136,.2);
}
.seq-dot {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--ci-teal);
animation: pulse-dot 1.6s ease infinite;
}
@keyframes pulse-dot {
0%,100% { opacity:1; } 50% { opacity:.35; }
}
/* Prof titulaire */
.main-teacher {
display: flex;
align-items: center;
gap: 7px;
font-size: 13px;
}
.teacher-avatar {
width: 26px; height: 26px;
border-radius: 50%;
background: linear-gradient(135deg, #1d4ed8, #0d9488);
color: #fff;
font-size: 10px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.no-teacher {
font-size: 12px;
color: var(--ci-rose);
font-style: italic;
}
/* Boutons action ligne */
.ci-actions {
display: flex;
align-items: center;
gap: 4px;
justify-content: flex-end;
}
.ci-btn {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 5px 10px;
border-radius: 7px;
font-size: 11.5px;
font-weight: 500;
text-decoration: none;
border: 1px solid var(--ci-border);
cursor: pointer;
background: #fff;
color: var(--ci-dim);
transition: background .15s, border-color .15s, color .15s;
white-space: nowrap;
}
.ci-btn:hover { border-color: var(--ci-border-hi); color: var(--ci-ink); background: #f8f9fa; }
.ci-btn-primary { background: var(--ci-blue-lt); color: var(--ci-blue); border-color: rgba(29,78,216,.25); }
.ci-btn-primary:hover { background: #1d4ed8; color: #fff; }
.ci-btn-warning { background: var(--ci-amber-lt); color: var(--ci-amber); border-color: rgba(180,83,9,.25); }
.ci-btn-warning:hover { background: #b45309; color: #fff; }
.ci-btn-danger { background: var(--ci-rose-lt); color: var(--ci-rose); border-color: rgba(190,18,60,.25); }
.ci-btn-danger:hover { background: #be123c; color: #fff; }
/* ── Pagination ────────────────────────────────────────────── */
.ci-pagination {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 14px 20px;
border-top: 1px solid var(--ci-border);
background: #fafbfc;
}
.ci-pagination__info { font-size: 12.5px; color: var(--ci-muted); }
.ci-pager {
display: flex;
align-items: center;
gap: 4px;
list-style: none;
margin: 0; padding: 0;
}
.ci-pager li a,
.ci-pager li span {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
height: 34px;
padding: 0 8px;
border-radius: 8px;
border: 1px solid var(--ci-border);
font-size: 13px;
font-weight: 500;
color: var(--ci-dim);
text-decoration: none;
background: #fff;
transition: background .15s, border-color .15s, color .15s;
}
.ci-pager li a:hover { border-color: var(--ci-blue); color: var(--ci-blue); }
.ci-pager li.active span {
background: var(--ci-blue);
color: #fff;
border-color: var(--ci-blue);
font-weight: 700;
}
.ci-pager li.disabled span { opacity: .4; cursor: default; }
/* ── Vide ──────────────────────────────────────────────────── */
.ci-empty {
text-align: center;
padding: 64px 24px;
color: var(--ci-muted);
}
.ci-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.ci-empty strong { display: block; font-size: 15px; color: var(--ci-dim); margin-bottom: 4px; }
/* ── Animation ─────────────────────────────────────────────── */
@keyframes fadeUp {
from { opacity:0; transform:translateY(10px); }
to { opacity:1; transform:none; }
}
.ci-table-card { animation: fadeUp .4s ease both; }
</style>
{% endblock %}
{% block content %}
<div class=\"container mt-4\">
<div class=\"d-flex justify-content-between align-items-center mb-3\">
<h4 class=\"text-uppercase\">Liste des salles de classe</h4>
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-info\" href=\"{{ path('admin_classrooms_new') }}\">
<i class=\"fa fa-plus\"></i> Ajouter
</a>
{% endif %}
</div>
<!-- Level Tabs -->
<ul class=\"nav nav-tabs\" id=\"levelTabs\" role=\"tablist\">
{% for level in levels %}
<li class=\"nav-item\" role=\"presentation\">
<button class=\"nav-link {% if loop.first %}active{% endif %}\" id=\"level-{{ level.id }}-tab\"
data-bs-toggle=\"tab\" data-bs-target=\"#level-{{ level.id }}\" type=\"button\"
role=\"tab\" aria-controls=\"level-{{ level.id }}\" aria-selected=\"{{ loop.first ? 'true' : 'false' }}\">
{{ level.fullName }}
</button>
</li>
{% endfor %}
</ul>
<!-- Classes per Level -->
<div class=\"tab-content mt-3\" id=\"levelTabsContent\">
{% for level in levels %}
<div class=\"tab-pane fade {% if loop.first %}show active{% endif %}\" id=\"level-{{ level.id }}\" role=\"tabpanel\">
{% if level.rooms|length > 0 %}
<!-- Random Color Header -->
{# pick a random color #}
{% set colors = ['#ff7a00', '#2f2f2f', '#28a745', '#009688', '#6f42c1'] %}
{% set color = random(colors) %}
<div class=\"level-header\" style=\"background-color: {{ color }};\">
<h5 class=\"m-0 text-white text-uppercase fw-bold level-title\">
{{ level.fullName }}
</h5>
</div>
<div class=\"classroom-grid mt-3\">
{% for room in level.rooms %}
<div class=\"classroom-card shadow-sm\">
<div class=\"card-header mb-2\">
<h5 class=\"mb-1 classroom-title\">
<a href=\"{{ path('admin_classrooms_show', {id: room.id}) }}\">
{{ room.name }}
</a>
</h5>
{% if room.id in mainTeachers|keys %}
<small class=\"text-muted\">
<i class=\"fa fa-user\"></i> {{ mainTeachers[room.id].fullName }}
</small>
{% else %}
<small class=\"text-danger\">— Pas de titulaire —</small>
{% endif %}
</div>
<!-- Flex Buttons -->
<div class=\"card-actions mt-3\">
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-outline-warning\" href=\"{{ path('admin_classrooms_edit', {id: room.id}) }}\">
<i class=\"fa fa-edit\"></i> Modifier
</a>
<a class=\"btn btn-outline-dark\" target=\"_blank\" href=\"{{ path('admin_classroom_insolvent', {id: room.id}) }}\">
<i class=\"fa fa-users\"></i> Débiteurs
</a>
<a class=\"btn btn-outline-success\" target=\"_blank\" href=\"{{ path('admin_payment_plan_print', {id: room.id}) }}\">
<i class=\"fa fa-money\"></i> Échéancier
</a>
{% endif %}
<a class=\"btn btn-outline-danger\" target=\"_blank\" href=\"{{ path('admin_classrooms_fichesimple', {id: room.id}) }}\">
<i class=\"fa fa-file-pdf-o\"></i> Notes
</a>
<a class=\"btn btn-outline-info\" target=\"_blank\" href=\"{{ path('admin_classrooms_presentation', {id: room.id}) }}\">
<i class=\"fa fa-users\"></i> Présentation
</a>
<a class=\"btn btn-outline-primary\" target=\"_blank\" href=\"{{ path('admin_classrooms_recapitulatif', {room: room.id, seq : seq}) }}\">
<i class=\"fa fa-file\"></i> Récap.
</a>
<a class=\"btn btn-outline-secondary\" target=\"_blank\" href=\"{{ path('admin_classrooms_disciplinary_record', {id: room.id}) }}\">
<i class=\"fa fa-th-list\"></i> Discipline
</a>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class=\"alert alert-warning mt-3\">Aucune classe trouvée pour ce niveau.</div>
{% endif %}
</div>
{% endfor %}
</div>
<div class=\"ci-page\">
{# ── Barre de tête ──────────────────────────────────────────── #}
<div class=\"ci-topbar\">
<div>
<div class=\"ci-topbar__title\">
<i class=\"fa fa-th-large\"></i>
Classes
</div>
<div class=\"ci-topbar__sub\">
Gestion des classes — {% if year %}Année scolaire {{ year.code }}{% endif %}
{% if seq > 0 %} · Séquence active{% endif %}
</div>
</div>
{% if is_granted('ROLE_ADMIN') %}
<a href=\"{{ path('admin_classrooms_new') }}\" class=\"btn-add\">
<i class=\"fa fa-plus\"></i> Nouvelle classe
</a>
{% endif %}
</div>
{# ── KPIs globaux ───────────────────────────────────────────── #}
<div class=\"ci-stats\">
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
<div>
<div class=\"ci-stat__val\">{{ classrooms|length }}</div>
<div class=\"ci-stat__lbl\">Classes</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
<div>
<div class=\"ci-stat__val\">{{ students_count() }}</div>
<div class=\"ci-stat__lbl\">Élèves inscrits</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
<div>
<div class=\"ci-stat__val\">{{ teachers_count() }}</div>
<div class=\"ci-stat__lbl\">Enseignants</div>
</div>
</div>
<div class=\"ci-stat\">
<div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
<div>
<div class=\"ci-stat__val\">{{ rooms_count() }}</div>
<div class=\"ci-stat__lbl\">Salles actives</div>
</div>
</div>
</div>
{# ── Tableau des classes ─────────────────────────────────────── #}
{% set items_per_page = 12 %}
{% set current_page = app.request.query.get('page', 1)|number_format %}
{% set total_pages = (classrooms|length / items_per_page)|round(0, 'ceil') %}
<div class=\"ci-table-card\">
<div class=\"ci-table-head\">
<div class=\"ci-table-head__title\">
<span class=\"ci-table-head__dot\"></span>
Liste des classes
<span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">({{ classrooms|length }} au total)</span>
</div>
<div style=\"display:flex;gap:8px;align-items:center;\">
<span class=\"seq-badge\">
<span class=\"seq-dot\"></span>
{% if seq > 0 %}Séquence active{% else %}Aucune séquence active{% endif %}
</span>
</div>
</div>
{% if classrooms is empty %}
<div class=\"ci-empty\">
<i class=\"fa fa-inbox\"></i>
<strong>Aucune classe enregistrée</strong>
Commencez par créer une classe.
</div>
{% else %}
<div style=\"overflow-x:auto;\">
<table class=\"ci-tbl\">
<thead>
<tr>
<th style=\"width:4%\">#</th>
<th style=\"width:18%\">Classe</th>
<th style=\"width:12%\">Niveau</th>
<th style=\"width:22%\">Professeur titulaire</th>
<th style=\"width:10%\" class=\"text-center\">Modules</th>
<th style=\"width:10%\" class=\"text-center\">Matières</th>
<th style=\"width:24%\" class=\"text-right\">Actions</th>
</tr>
</thead>
<tbody>
{% for classroom in classrooms %}
{# ── Pagination côté Twig ── #}
{% if loop.index > (current_page - 1) * items_per_page and loop.index <= current_page * items_per_page %}
<tr>
<td style=\"color:var(--ci-muted);font-size:12px\">{{ (current_page - 1) * items_per_page + loop.index - ((current_page - 1) * items_per_page) }}</td>
<td>
<a href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" class=\"room-link\">
<span class=\"room-name\">{{ classroom.name }}</span>
</a>
</td>
<td>
<span class=\"level-badge\">{{ classroom.level }}</span>
</td>
<td>
{% if mainTeachers[classroom.id] is defined %}
<div class=\"main-teacher\">
<div class=\"teacher-avatar\">
{{ mainTeachers[classroom.id].fullName|slice(0,1)|upper }}{{ mainTeachers[classroom.id].fullName|split(' ')|last|slice(0,1)|upper }}
</div>
{{ mainTeachers[classroom.id].fullName }}
</div>
{% else %}
<span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
{% endif %}
</td>
<td class=\"text-center\">
<span style=\"font-weight:600;color:var(--ci-blue)\">{{ classroom.modules|length }}</span>
</td>
<td class=\"text-center\">
{% set total_courses = 0 %}
{% for module in classroom.modules %}
{% set total_courses = total_courses + module.courses|length %}
{% endfor %}
<span style=\"font-weight:600;color:var(--ci-teal)\">{{ total_courses }}</span>
</td>
<td>
<div class=\"ci-actions\">
<a class=\"ci-btn ci-btn-primary\" href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" title=\"Voir\">
<i class=\"fa fa-eye\"></i> Voir
</a>
{% if is_granted('ROLE_ADMIN') %}
<a class=\"ci-btn ci-btn-warning\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\" title=\"Modifier\">
<i class=\"fa fa-pencil\"></i>
</a>
{% if seq > 0 %}
<a class=\"ci-btn\" href=\"{{ path('admin_classrooms_recapitulatif', {room: classroom.id, seq: seq}) }}\" title=\"Récapitulatif PDF\">
<i class=\"fa fa-file-pdf-o\"></i>
</a>
{% endif %}
<form method=\"post\" action=\"{{ path('admin_classrooms_delete', {id: classroom.id}) }}\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
<input type=\"hidden\" name=\"_method\" value=\"DELETE\">
<button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
<i class=\"fa fa-trash\"></i>
</button>
</form>
{% endif %}
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{# ── Pagination ────────────────────────────────────────────── #}
{% if total_pages > 1 %}
<div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">
Page {{ current_page }} sur {{ total_pages }} — {{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }}
</div>
<ul class=\"ci-pager\">
<li class=\"{{ current_page <= 1 ? 'disabled' : '' }}\">
{% if current_page > 1 %}
<a href=\"?page={{ current_page - 1 }}\"><i class=\"fa fa-chevron-left\"></i></a>
{% else %}
<span><i class=\"fa fa-chevron-left\"></i></span>
{% endif %}
</li>
{% for p in 1..total_pages %}
{% if p == current_page %}
<li class=\"active\"><span>{{ p }}</span></li>
{% elseif p == 1 or p == total_pages or (p >= current_page - 2 and p <= current_page + 2) %}
<li><a href=\"?page={{ p }}\">{{ p }}</a></li>
{% elseif p == current_page - 3 or p == current_page + 3 %}
<li><span style=\"border:none;background:transparent\">…</span></li>
{% endif %}
{% endfor %}
<li class=\"{{ current_page >= total_pages ? 'disabled' : '' }}\">
{% if current_page < total_pages %}
<a href=\"?page={{ current_page + 1 }}\"><i class=\"fa fa-chevron-right\"></i></a>
{% else %}
<span><i class=\"fa fa-chevron-right\"></i></span>
{% endif %}
</li>
</ul>
</div>
{% else %}
<div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">{{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }} au total</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}
", "classroom/index.html.twig", "/var/www/bethesda/templates/classroom/index.html.twig");
}
}