<?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_f44a3cee19d19dd362993b95ca3c1ff1 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=\"ci-page\">
";
// line 334
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 341
if ((($tmp = (isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 341, $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.', 341, $this->source); })()), "code", [], "any", false, false, false, 341), "html", null, true);
}
// line 342
yield " ";
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 342, $this->source); })()) > 0)) {
yield " · Séquence active";
}
// line 343
yield " </div>
</div>
";
// line 345
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 346
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 350
yield " </div>
";
// line 353
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 357
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.', 357, $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 364
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 371
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 378
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 385
yield " ";
$context["items_per_page"] = 12;
// line 386
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.', 386, $this->source); })()), "request", [], "any", false, false, false, 386), "query", [], "any", false, false, false, 386), "get", ["page", 1], "method", false, false, false, 386));
// line 387
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.', 387, $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.', 387, $this->source); })())), 0, "ceil");
// line 388
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 394
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.', 394, $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 399
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 399, $this->source); })()) > 0)) {
yield "Séquence active";
} else {
yield "Aucune séquence active";
}
// line 400
yield " </span>
</div>
</div>
";
// line 404
if (Twig\Extension\CoreExtension::testEmpty((isset($context["classrooms"]) || array_key_exists("classrooms", $context) ? $context["classrooms"] : (function () { throw new RuntimeError('Variable "classrooms" does not exist.', 404, $this->source); })()))) {
// line 405
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 411
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 425
$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.', 425, $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 426
yield " ";
// line 427
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 427) > (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 427, $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.', 427, $this->source); })()))) && (CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 427) <= ((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 427, $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.', 427, $this->source); })()))))) {
// line 428
yield " <tr>
<td style=\"color:var(--ci-muted);font-size:12px\">";
// line 429
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.', 429, $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.', 429, $this->source); })())) + CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 429)) - (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 429, $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.', 429, $this->source); })()))), "html", null, true);
yield "</td>
<td>
<a href=\"";
// line 432
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, 432)]), "html", null, true);
yield "\" class=\"room-link\">
<span class=\"room-name\">";
// line 433
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "name", [], "any", false, false, false, 433), "html", null, true);
yield "</span>
</a>
</td>
<td>
<span class=\"level-badge\">";
// line 438
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "level", [], "any", false, false, false, 438), "html", null, true);
yield "</span>
</td>
<td>
";
// line 442
if (CoreExtension::getAttribute($this->env, $this->source, ($context["mainTeachers"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 442), [], "array", true, true, false, 442)) {
// line 443
yield " <div class=\"main-teacher\">
<div class=\"teacher-avatar\">
";
// line 445
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.', 445, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 445), [], "array", false, false, false, 445), "fullName", [], "any", false, false, false, 445), 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.', 445, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 445), [], "array", false, false, false, 445), "fullName", [], "any", false, false, false, 445), " ")), 0, 1)), "html", null, true);
yield "
</div>
";
// line 447
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.', 447, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "id", [], "any", false, false, false, 447), [], "array", false, false, false, 447), "fullName", [], "any", false, false, false, 447), "html", null, true);
yield "
</div>
";
} else {
// line 450
yield " <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
";
}
// line 452
yield " </td>
<td class=\"text-center\">
<span style=\"font-weight:600;color:var(--ci-blue)\">";
// line 455
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, 455)), "html", null, true);
yield "</span>
</td>
<td class=\"text-center\">
";
// line 459
$context["total_courses"] = 0;
// line 460
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "modules", [], "any", false, false, false, 460));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 461
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.', 461, $this->source); })()) + Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 461)));
// line 462
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 463
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.', 463, $this->source); })()), "html", null, true);
yield "</span>
</td>
<td>
<div class=\"ci-actions\">
<a class=\"ci-btn ci-btn-primary\" href=\"";
// line 468
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, 468)]), "html", null, true);
yield "\" title=\"Voir\">
<i class=\"fa fa-eye\"></i> Voir
</a>
";
// line 471
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 472
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, 472)]), "html", null, true);
yield "\" title=\"Modifier\">
<i class=\"fa fa-pencil\"></i>
</a>
";
// line 475
if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 475, $this->source); })()) > 0)) {
// line 476
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, 476), "seq" => (isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 476, $this->source); })())]), "html", null, true);
yield "\" title=\"Récapitulatif PDF\">
<i class=\"fa fa-file-pdf-o\"></i>
</a>
";
}
// line 480
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, 480)]), "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 487
yield " </div>
</td>
</tr>
";
}
// line 491
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 492
yield " </tbody>
</table>
</div>
";
// line 497
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.', 497, $this->source); })()) > 1)) {
// line 498
yield " <div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">
Page ";
// line 500
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.', 500, $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.', 500, $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.', 500, $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.', 500, $this->source); })())) > 1)) ? ("s") : (""));
yield "
</div>
<ul class=\"ci-pager\">
<li class=\"";
// line 503
yield ((((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 503, $this->source); })()) <= 1)) ? ("disabled") : (""));
yield "\">
";
// line 504
if (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 504, $this->source); })()) > 1)) {
// line 505
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.', 505, $this->source); })()) - 1), "html", null, true);
yield "\"><i class=\"fa fa-chevron-left\"></i></a>
";
} else {
// line 507
yield " <span><i class=\"fa fa-chevron-left\"></i></span>
";
}
// line 509
yield " </li>
";
// line 510
$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.', 510, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 511
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.', 511, $this->source); })()))) {
// line 512
yield " <li class=\"active\"><span>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "</span></li>
";
} elseif (((( // line 513
$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.', 513, $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.', 513, $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.', 513, $this->source); })()) + 2))))) {
// line 514
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 515
$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.', 515, $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.', 515, $this->source); })()) + 3)))) {
// line 516
yield " <li><span style=\"border:none;background:transparent\">…</span></li>
";
}
// line 518
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 519
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.', 519, $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.', 519, $this->source); })()))) ? ("disabled") : (""));
yield "\">
";
// line 520
if (((isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 520, $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.', 520, $this->source); })()))) {
// line 521
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.', 521, $this->source); })()) + 1), "html", null, true);
yield "\"><i class=\"fa fa-chevron-right\"></i></a>
";
} else {
// line 523
yield " <span><i class=\"fa fa-chevron-right\"></i></span>
";
}
// line 525
yield " </li>
</ul>
</div>
";
} else {
// line 529
yield " <div class=\"ci-pagination\">
<div class=\"ci-pagination__info\">";
// line 530
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.', 530, $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.', 530, $this->source); })())) > 1)) ? ("s") : (""));
yield " au total</div>
</div>
";
}
// line 533
yield "
";
}
// line 535
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 ( 855 => 535, 851 => 533, 843 => 530, 840 => 529, 834 => 525, 830 => 523, 824 => 521, 822 => 520, 817 => 519, 811 => 518, 807 => 516, 805 => 515, 798 => 514, 796 => 513, 791 => 512, 788 => 511, 784 => 510, 781 => 509, 777 => 507, 771 => 505, 769 => 504, 765 => 503, 753 => 500, 749 => 498, 746 => 497, 740 => 492, 726 => 491, 720 => 487, 709 => 480, 701 => 476, 699 => 475, 692 => 472, 690 => 471, 684 => 468, 675 => 463, 669 => 462, 666 => 461, 661 => 460, 659 => 459, 652 => 455, 647 => 452, 643 => 450, 637 => 447, 631 => 445, 627 => 443, 625 => 442, 618 => 438, 610 => 433, 606 => 432, 600 => 429, 597 => 428, 594 => 427, 592 => 426, 575 => 425, 559 => 411, 551 => 405, 549 => 404, 543 => 400, 537 => 399, 529 => 394, 521 => 388, 518 => 387, 515 => 386, 512 => 385, 503 => 378, 493 => 371, 483 => 364, 473 => 357, 467 => 353, 463 => 350, 455 => 346, 453 => 345, 449 => 343, 444 => 342, 439 => 341, 430 => 334, 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=\"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");
}
}