var/cache/dev/twig/5a/5a9c277a3d724c85cd87f780c2fd536d.php line 44

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* classroom/index.html.twig */
  16. class __TwigTemplate_f823ab9d18e428be626d570c6bea4d2f extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'stylesheets' => [$this, 'block_stylesheets'],
  29. 'content' => [$this, 'block_content'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "layout/backEndLayout.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/index.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/index.html.twig"));
  44. $this->parent = $this->load("layout/backEndLayout.html.twig", 1);
  45. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48. }
  49. // line 3
  50. /**
  51. * @return iterable<null|scalar|\Stringable>
  52. */
  53. public function block_stylesheets(array $context, array $blocks = []): iterable
  54. {
  55. $macros = $this->macros;
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  60. // line 4
  61. yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
  62. yield "
  63. <style>
  64. /* ── Tokens locaux ─────────────────────────────────────────── */
  65. :root {
  66. --ci-bg : #f5f7fa;
  67. --ci-card : #ffffff;
  68. --ci-border : rgba(0,0,0,.08);
  69. --ci-border-hi: rgba(0,0,0,.16);
  70. --ci-ink : #111827;
  71. --ci-dim : #4b5563;
  72. --ci-muted : #9ca3af;
  73. --ci-blue : #1d4ed8;
  74. --ci-blue-lt : rgba(29,78,216,.1);
  75. --ci-teal : #0d9488;
  76. --ci-teal-lt : rgba(13,148,136,.1);
  77. --ci-amber : #b45309;
  78. --ci-amber-lt : rgba(180,83,9,.1);
  79. --ci-rose : #be123c;
  80. --ci-rose-lt : rgba(190,18,60,.1);
  81. --ci-r : 12px;
  82. --ci-rs : 8px;
  83. --ci-shadow : 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  84. }
  85. /* ── Layout page ───────────────────────────────────────────── */
  86. .ci-page { font-family:'DM Sans','Segoe UI',sans-serif; }
  87. /* ── Barre de tête ─────────────────────────────────────────── */
  88. .ci-topbar {
  89. display: flex;
  90. align-items: center;
  91. justify-content: space-between;
  92. flex-wrap: wrap;
  93. gap: 12px;
  94. margin-bottom: 24px;
  95. }
  96. .ci-topbar__title {
  97. font-size: 20px;
  98. font-weight: 700;
  99. color: var(--ci-ink);
  100. display: flex;
  101. align-items: center;
  102. gap: 10px;
  103. }
  104. .ci-topbar__title i { color: var(--ci-blue); font-size: 18px; }
  105. .ci-topbar__sub { font-size: 13px; color: var(--ci-muted); margin-top: 2px; }
  106. /* ── Statistiques globales ─────────────────────────────────── */
  107. .ci-stats {
  108. display: grid;
  109. grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  110. gap: 12px;
  111. margin-bottom: 24px;
  112. }
  113. .ci-stat {
  114. background: var(--ci-card);
  115. border: 1px solid var(--ci-border);
  116. border-radius: var(--ci-r);
  117. padding: 16px;
  118. display: flex;
  119. align-items: center;
  120. gap: 12px;
  121. transition: box-shadow .2s;
  122. }
  123. .ci-stat:hover { box-shadow: var(--ci-shadow); }
  124. .ci-stat__icon {
  125. width: 40px; height: 40px;
  126. border-radius: var(--ci-rs);
  127. display: flex; align-items: center; justify-content: center;
  128. font-size: 16px; flex-shrink: 0;
  129. }
  130. .ic-blue { background: var(--ci-blue-lt); color: var(--ci-blue); }
  131. .ic-teal { background: var(--ci-teal-lt); color: var(--ci-teal); }
  132. .ic-amber { background: var(--ci-amber-lt); color: var(--ci-amber); }
  133. .ic-rose { background: var(--ci-rose-lt); color: var(--ci-rose); }
  134. .ci-stat__val { font-size: 22px; font-weight: 700; color: var(--ci-ink); line-height: 1; }
  135. .ci-stat__lbl { font-size: 11.5px; color: var(--ci-muted); margin-top: 2px; }
  136. /* ── Tableau ───────────────────────────────────────────────── */
  137. .ci-table-card {
  138. background: var(--ci-card);
  139. border: 1px solid var(--ci-border);
  140. border-radius: var(--ci-r);
  141. overflow: hidden;
  142. box-shadow: var(--ci-shadow);
  143. }
  144. .ci-table-head {
  145. display: flex;
  146. align-items: center;
  147. justify-content: space-between;
  148. flex-wrap: wrap;
  149. gap: 10px;
  150. padding: 16px 20px;
  151. border-bottom: 1px solid var(--ci-border);
  152. background: #fafbfc;
  153. }
  154. .ci-table-head__title {
  155. font-size: 14px;
  156. font-weight: 600;
  157. color: var(--ci-ink);
  158. display: flex;
  159. align-items: center;
  160. gap: 8px;
  161. }
  162. .ci-table-head__dot {
  163. width: 8px; height: 8px;
  164. border-radius: 50%;
  165. background: var(--ci-blue);
  166. box-shadow: 0 0 6px var(--ci-blue);
  167. }
  168. /* Bouton ajouter */
  169. .btn-add {
  170. display: inline-flex;
  171. align-items: center;
  172. gap: 6px;
  173. padding: 8px 16px;
  174. background: var(--ci-blue);
  175. color: #fff;
  176. border-radius: var(--ci-rs);
  177. font-size: 13px;
  178. font-weight: 600;
  179. text-decoration: none;
  180. border: none;
  181. cursor: pointer;
  182. transition: background .18s, transform .14s;
  183. }
  184. .btn-add:hover { background: #1e40af; color: #fff; transform: translateY(-1px); }
  185. /* Table */
  186. table.ci-tbl {
  187. width: 100%;
  188. border-collapse: collapse;
  189. font-size: 13.5px;
  190. }
  191. table.ci-tbl thead th {
  192. padding: 10px 16px;
  193. color: var(--ci-muted);
  194. font-size: 11px;
  195. font-weight: 600;
  196. text-transform: uppercase;
  197. letter-spacing: .06em;
  198. background: #fafbfc;
  199. border-bottom: 1px solid var(--ci-border);
  200. white-space: nowrap;
  201. }
  202. table.ci-tbl tbody td {
  203. padding: 12px 16px;
  204. border-bottom: 1px solid rgba(0,0,0,.04);
  205. color: var(--ci-ink);
  206. vertical-align: middle;
  207. }
  208. table.ci-tbl tbody tr:last-child td { border-bottom: none; }
  209. table.ci-tbl tbody tr { transition: background .12s; }
  210. table.ci-tbl tbody tr:hover td { background: rgba(29,78,216,.03); }
  211. /* Nom de la classe */
  212. .room-name {
  213. font-weight: 700;
  214. font-size: 14px;
  215. color: var(--ci-ink);
  216. }
  217. .room-link {
  218. display: inline-flex;
  219. align-items: center;
  220. gap: 6px;
  221. color: var(--ci-ink);
  222. text-decoration: none;
  223. }
  224. .room-link:hover { color: var(--ci-blue); }
  225. .room-link:hover .room-name { text-decoration: underline; }
  226. /* Niveau badge */
  227. .level-badge {
  228. display: inline-block;
  229. padding: 3px 10px;
  230. border-radius: 20px;
  231. font-size: 11.5px;
  232. font-weight: 600;
  233. background: var(--ci-blue-lt);
  234. color: var(--ci-blue);
  235. border: 1px solid rgba(29,78,216,.2);
  236. }
  237. /* Séquence active */
  238. .seq-badge {
  239. display: inline-flex;
  240. align-items: center;
  241. gap: 5px;
  242. padding: 3px 10px;
  243. border-radius: 20px;
  244. font-size: 11px;
  245. font-weight: 500;
  246. background: var(--ci-teal-lt);
  247. color: var(--ci-teal);
  248. border: 1px solid rgba(13,148,136,.2);
  249. }
  250. .seq-dot {
  251. width: 6px; height: 6px;
  252. border-radius: 50%;
  253. background: var(--ci-teal);
  254. animation: pulse-dot 1.6s ease infinite;
  255. }
  256. @keyframes pulse-dot {
  257. 0%,100% { opacity:1; } 50% { opacity:.35; }
  258. }
  259. /* Prof titulaire */
  260. .main-teacher {
  261. display: flex;
  262. align-items: center;
  263. gap: 7px;
  264. font-size: 13px;
  265. }
  266. .teacher-avatar {
  267. width: 26px; height: 26px;
  268. border-radius: 50%;
  269. background: linear-gradient(135deg, #1d4ed8, #0d9488);
  270. color: #fff;
  271. font-size: 10px;
  272. font-weight: 700;
  273. display: flex;
  274. align-items: center;
  275. justify-content: center;
  276. flex-shrink: 0;
  277. }
  278. .no-teacher {
  279. font-size: 12px;
  280. color: var(--ci-rose);
  281. font-style: italic;
  282. }
  283. /* Boutons action ligne */
  284. .ci-actions {
  285. display: flex;
  286. align-items: center;
  287. gap: 4px;
  288. justify-content: flex-end;
  289. }
  290. .ci-btn {
  291. display: inline-flex;
  292. align-items: center;
  293. gap: 5px;
  294. padding: 5px 10px;
  295. border-radius: 7px;
  296. font-size: 11.5px;
  297. font-weight: 500;
  298. text-decoration: none;
  299. border: 1px solid var(--ci-border);
  300. cursor: pointer;
  301. background: #fff;
  302. color: var(--ci-dim);
  303. transition: background .15s, border-color .15s, color .15s;
  304. white-space: nowrap;
  305. }
  306. .ci-btn:hover { border-color: var(--ci-border-hi); color: var(--ci-ink); background: #f8f9fa; }
  307. .ci-btn-primary { background: var(--ci-blue-lt); color: var(--ci-blue); border-color: rgba(29,78,216,.25); }
  308. .ci-btn-primary:hover { background: #1d4ed8; color: #fff; }
  309. .ci-btn-warning { background: var(--ci-amber-lt); color: var(--ci-amber); border-color: rgba(180,83,9,.25); }
  310. .ci-btn-warning:hover { background: #b45309; color: #fff; }
  311. .ci-btn-danger { background: var(--ci-rose-lt); color: var(--ci-rose); border-color: rgba(190,18,60,.25); }
  312. .ci-btn-danger:hover { background: #be123c; color: #fff; }
  313. /* ── Pagination ────────────────────────────────────────────── */
  314. .ci-pagination {
  315. display: flex;
  316. align-items: center;
  317. justify-content: space-between;
  318. flex-wrap: wrap;
  319. gap: 10px;
  320. padding: 14px 20px;
  321. border-top: 1px solid var(--ci-border);
  322. background: #fafbfc;
  323. }
  324. .ci-pagination__info { font-size: 12.5px; color: var(--ci-muted); }
  325. .ci-pager {
  326. display: flex;
  327. align-items: center;
  328. gap: 4px;
  329. list-style: none;
  330. margin: 0; padding: 0;
  331. }
  332. .ci-pager li a,
  333. .ci-pager li span {
  334. display: inline-flex;
  335. align-items: center;
  336. justify-content: center;
  337. min-width: 34px;
  338. height: 34px;
  339. padding: 0 8px;
  340. border-radius: 8px;
  341. border: 1px solid var(--ci-border);
  342. font-size: 13px;
  343. font-weight: 500;
  344. color: var(--ci-dim);
  345. text-decoration: none;
  346. background: #fff;
  347. transition: background .15s, border-color .15s, color .15s;
  348. }
  349. .ci-pager li a:hover { border-color: var(--ci-blue); color: var(--ci-blue); }
  350. .ci-pager li.active span {
  351. background: var(--ci-blue);
  352. color: #fff;
  353. border-color: var(--ci-blue);
  354. font-weight: 700;
  355. }
  356. .ci-pager li.disabled span { opacity: .4; cursor: default; }
  357. /* ── Vide ──────────────────────────────────────────────────── */
  358. .ci-empty {
  359. text-align: center;
  360. padding: 64px 24px;
  361. color: var(--ci-muted);
  362. }
  363. .ci-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
  364. .ci-empty strong { display: block; font-size: 15px; color: var(--ci-dim); margin-bottom: 4px; }
  365. /* ── Animation ─────────────────────────────────────────────── */
  366. @keyframes fadeUp {
  367. from { opacity:0; transform:translateY(10px); }
  368. to { opacity:1; transform:none; }
  369. }
  370. .ci-table-card { animation: fadeUp .4s ease both; }
  371. </style>
  372. ";
  373. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  374. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  375. yield from [];
  376. }
  377. // line 330
  378. /**
  379. * @return iterable<null|scalar|\Stringable>
  380. */
  381. public function block_content(array $context, array $blocks = []): iterable
  382. {
  383. $macros = $this->macros;
  384. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  385. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  386. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  387. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  388. // line 331
  389. yield "<div class=\"container mt-4\">
  390. <div class=\"d-flex justify-content-between align-items-center mb-3\">
  391. <h4 class=\"text-uppercase\">Liste des salles de classe</h4>
  392. ";
  393. // line 335
  394. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  395. // line 336
  396. yield " <a class=\"btn btn-info\" href=\"";
  397. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
  398. yield "\">
  399. <i class=\"fa fa-plus\"></i> Ajouter
  400. </a>
  401. ";
  402. }
  403. // line 340
  404. yield " </div>
  405. <!-- Level Tabs -->
  406. <ul class=\"nav nav-tabs\" id=\"levelTabs\" role=\"tablist\">
  407. ";
  408. // line 344
  409. $context['_parent'] = $context;
  410. $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); })()));
  411. $context['loop'] = [
  412. 'parent' => $context['_parent'],
  413. 'index0' => 0,
  414. 'index' => 1,
  415. 'first' => true,
  416. ];
  417. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  418. $length = count($context['_seq']);
  419. $context['loop']['revindex0'] = $length - 1;
  420. $context['loop']['revindex'] = $length;
  421. $context['loop']['length'] = $length;
  422. $context['loop']['last'] = 1 === $length;
  423. }
  424. foreach ($context['_seq'] as $context["_key"] => $context["level"]) {
  425. // line 345
  426. yield " <li class=\"nav-item\" role=\"presentation\">
  427. <button class=\"nav-link ";
  428. // line 346
  429. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 346)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  430. yield "active";
  431. }
  432. yield "\" id=\"level-";
  433. 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);
  434. yield "-tab\"
  435. data-bs-toggle=\"tab\" data-bs-target=\"#level-";
  436. // line 347
  437. 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);
  438. yield "\" type=\"button\"
  439. role=\"tab\" aria-controls=\"level-";
  440. // line 348
  441. 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);
  442. yield "\" aria-selected=\"";
  443. yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 348)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("true") : ("false"));
  444. yield "\">
  445. ";
  446. // line 349
  447. 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);
  448. yield "
  449. </button>
  450. </li>
  451. ";
  452. ++$context['loop']['index0'];
  453. ++$context['loop']['index'];
  454. $context['loop']['first'] = false;
  455. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  456. --$context['loop']['revindex0'];
  457. --$context['loop']['revindex'];
  458. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  459. }
  460. }
  461. $_parent = $context['_parent'];
  462. unset($context['_seq'], $context['_key'], $context['level'], $context['_parent'], $context['loop']);
  463. $context = array_intersect_key($context, $_parent) + $_parent;
  464. // line 353
  465. yield " </ul>
  466. <!-- Classes per Level -->
  467. <div class=\"tab-content mt-3\" id=\"levelTabsContent\">
  468. ";
  469. // line 357
  470. $context['_parent'] = $context;
  471. $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); })()));
  472. $context['loop'] = [
  473. 'parent' => $context['_parent'],
  474. 'index0' => 0,
  475. 'index' => 1,
  476. 'first' => true,
  477. ];
  478. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  479. $length = count($context['_seq']);
  480. $context['loop']['revindex0'] = $length - 1;
  481. $context['loop']['revindex'] = $length;
  482. $context['loop']['length'] = $length;
  483. $context['loop']['last'] = 1 === $length;
  484. }
  485. foreach ($context['_seq'] as $context["_key"] => $context["level"]) {
  486. // line 358
  487. yield " <div class=\"tab-pane fade ";
  488. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 358)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  489. yield "show active";
  490. }
  491. yield "\" id=\"level-";
  492. 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);
  493. yield "\" role=\"tabpanel\">
  494. ";
  495. // line 359
  496. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["level"], "rooms", [], "any", false, false, false, 359)) > 0)) {
  497. // line 360
  498. yield " <!-- Random Color Header -->
  499. ";
  500. // line 362
  501. $context["colors"] = ["#ff7a00", "#2f2f2f", "#28a745", "#009688", "#6f42c1"];
  502. // line 363
  503. $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); })()));
  504. // line 364
  505. yield "
  506. <div class=\"level-header\" style=\"background-color: ";
  507. // line 365
  508. 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);
  509. yield ";\">
  510. <h5 class=\"m-0 text-white text-uppercase fw-bold level-title\">
  511. ";
  512. // line 367
  513. 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);
  514. yield "
  515. </h5>
  516. </div>
  517. <div class=\"classroom-grid mt-3\">
  518. ";
  519. // line 373
  520. $context['_parent'] = $context;
  521. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["level"], "rooms", [], "any", false, false, false, 373));
  522. foreach ($context['_seq'] as $context["_key"] => $context["room"]) {
  523. // line 374
  524. yield " <div class=\"classroom-card shadow-sm\">
  525. <div class=\"card-header mb-2\">
  526. <h5 class=\"mb-1 classroom-title\">
  527. <a href=\"";
  528. // line 377
  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["room"], "id", [], "any", false, false, false, 377)]), "html", null, true);
  530. yield "\">
  531. ";
  532. // line 378
  533. 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);
  534. yield "
  535. </a>
  536. </h5>
  537. ";
  538. // line 382
  539. 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); })())))) {
  540. // line 383
  541. yield " <small class=\"text-muted\">
  542. <i class=\"fa fa-user\"></i> ";
  543. // line 384
  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.', 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);
  545. yield "
  546. </small>
  547. ";
  548. } else {
  549. // line 387
  550. yield " <small class=\"text-danger\">— Pas de titulaire —</small>
  551. ";
  552. }
  553. // line 389
  554. yield " </div>
  555. <!-- Flex Buttons -->
  556. <div class=\"card-actions mt-3\">
  557. ";
  558. // line 393
  559. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  560. // line 394
  561. yield " <a class=\"btn btn-outline-warning\" href=\"";
  562. 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);
  563. yield "\">
  564. <i class=\"fa fa-edit\"></i> Modifier
  565. </a>
  566. <a class=\"btn btn-outline-dark\" target=\"_blank\" href=\"";
  567. // line 397
  568. 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);
  569. yield "\">
  570. <i class=\"fa fa-users\"></i> Débiteurs
  571. </a>
  572. <a class=\"btn btn-outline-success\" target=\"_blank\" href=\"";
  573. // line 400
  574. 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);
  575. yield "\">
  576. <i class=\"fa fa-money\"></i> Échéancier
  577. </a>
  578. ";
  579. }
  580. // line 404
  581. yield "
  582. <a class=\"btn btn-outline-danger\" target=\"_blank\" href=\"";
  583. // line 405
  584. 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);
  585. yield "\">
  586. <i class=\"fa fa-file-pdf-o\"></i> Notes
  587. </a>
  588. <a class=\"btn btn-outline-info\" target=\"_blank\" href=\"";
  589. // line 408
  590. 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);
  591. yield "\">
  592. <i class=\"fa fa-users\"></i> Présentation
  593. </a>
  594. <a class=\"btn btn-outline-primary\" target=\"_blank\" href=\"";
  595. // line 411
  596. 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);
  597. yield "\">
  598. <i class=\"fa fa-file\"></i> Récap.
  599. </a>
  600. <a class=\"btn btn-outline-secondary\" target=\"_blank\" href=\"";
  601. // line 414
  602. 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);
  603. yield "\">
  604. <i class=\"fa fa-th-list\"></i> Discipline
  605. </a>
  606. </div>
  607. </div>
  608. ";
  609. }
  610. $_parent = $context['_parent'];
  611. unset($context['_seq'], $context['_key'], $context['room'], $context['_parent']);
  612. $context = array_intersect_key($context, $_parent) + $_parent;
  613. // line 420
  614. yield " </div>
  615. ";
  616. } else {
  617. // line 422
  618. yield " <div class=\"alert alert-warning mt-3\">Aucune classe trouvée pour ce niveau.</div>
  619. ";
  620. }
  621. // line 424
  622. yield "
  623. </div>
  624. ";
  625. ++$context['loop']['index0'];
  626. ++$context['loop']['index'];
  627. $context['loop']['first'] = false;
  628. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  629. --$context['loop']['revindex0'];
  630. --$context['loop']['revindex'];
  631. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  632. }
  633. }
  634. $_parent = $context['_parent'];
  635. unset($context['_seq'], $context['_key'], $context['level'], $context['_parent'], $context['loop']);
  636. $context = array_intersect_key($context, $_parent) + $_parent;
  637. // line 427
  638. yield " </div>
  639. <div class=\"ci-page\">
  640. ";
  641. // line 431
  642. yield " <div class=\"ci-topbar\">
  643. <div>
  644. <div class=\"ci-topbar__title\">
  645. <i class=\"fa fa-th-large\"></i>
  646. Classes
  647. </div>
  648. <div class=\"ci-topbar__sub\">
  649. Gestion des classes — ";
  650. // line 438
  651. 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)) {
  652. yield "Année scolaire ";
  653. 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);
  654. }
  655. // line 439
  656. yield " ";
  657. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 439, $this->source); })()) > 0)) {
  658. yield " · Séquence active";
  659. }
  660. // line 440
  661. yield " </div>
  662. </div>
  663. ";
  664. // line 442
  665. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  666. // line 443
  667. yield " <a href=\"";
  668. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
  669. yield "\" class=\"btn-add\">
  670. <i class=\"fa fa-plus\"></i> Nouvelle classe
  671. </a>
  672. ";
  673. }
  674. // line 447
  675. yield " </div>
  676. ";
  677. // line 450
  678. yield " <div class=\"ci-stats\">
  679. <div class=\"ci-stat\">
  680. <div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
  681. <div>
  682. <div class=\"ci-stat__val\">";
  683. // line 454
  684. 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);
  685. yield "</div>
  686. <div class=\"ci-stat__lbl\">Classes</div>
  687. </div>
  688. </div>
  689. <div class=\"ci-stat\">
  690. <div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
  691. <div>
  692. <div class=\"ci-stat__val\">";
  693. // line 461
  694. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->students(), "html", null, true);
  695. yield "</div>
  696. <div class=\"ci-stat__lbl\">Élèves inscrits</div>
  697. </div>
  698. </div>
  699. <div class=\"ci-stat\">
  700. <div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
  701. <div>
  702. <div class=\"ci-stat__val\">";
  703. // line 468
  704. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->teachers(), "html", null, true);
  705. yield "</div>
  706. <div class=\"ci-stat__lbl\">Enseignants</div>
  707. </div>
  708. </div>
  709. <div class=\"ci-stat\">
  710. <div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
  711. <div>
  712. <div class=\"ci-stat__val\">";
  713. // line 475
  714. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->rooms(), "html", null, true);
  715. yield "</div>
  716. <div class=\"ci-stat__lbl\">Salles actives</div>
  717. </div>
  718. </div>
  719. </div>
  720. ";
  721. // line 482
  722. yield " ";
  723. $context["items_per_page"] = 12;
  724. // line 483
  725. yield " ";
  726. $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));
  727. // line 484
  728. yield " ";
  729. $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");
  730. // line 485
  731. yield "
  732. <div class=\"ci-table-card\">
  733. <div class=\"ci-table-head\">
  734. <div class=\"ci-table-head__title\">
  735. <span class=\"ci-table-head__dot\"></span>
  736. Liste des classes
  737. <span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">(";
  738. // line 491
  739. 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);
  740. yield " au total)</span>
  741. </div>
  742. <div style=\"display:flex;gap:8px;align-items:center;\">
  743. <span class=\"seq-badge\">
  744. <span class=\"seq-dot\"></span>
  745. ";
  746. // line 496
  747. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 496, $this->source); })()) > 0)) {
  748. yield "Séquence active";
  749. } else {
  750. yield "Aucune séquence active";
  751. }
  752. // line 497
  753. yield " </span>
  754. </div>
  755. </div>
  756. ";
  757. // line 501
  758. 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); })()))) {
  759. // line 502
  760. yield " <div class=\"ci-empty\">
  761. <i class=\"fa fa-inbox\"></i>
  762. <strong>Aucune classe enregistrée</strong>
  763. Commencez par créer une classe.
  764. </div>
  765. ";
  766. } else {
  767. // line 508
  768. yield " <div style=\"overflow-x:auto;\">
  769. <table class=\"ci-tbl\">
  770. <thead>
  771. <tr>
  772. <th style=\"width:4%\">#</th>
  773. <th style=\"width:18%\">Classe</th>
  774. <th style=\"width:12%\">Niveau</th>
  775. <th style=\"width:22%\">Professeur titulaire</th>
  776. <th style=\"width:10%\" class=\"text-center\">Modules</th>
  777. <th style=\"width:10%\" class=\"text-center\">Matières</th>
  778. <th style=\"width:24%\" class=\"text-right\">Actions</th>
  779. </tr>
  780. </thead>
  781. <tbody>
  782. ";
  783. // line 522
  784. $context['_parent'] = $context;
  785. $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); })()));
  786. $context['loop'] = [
  787. 'parent' => $context['_parent'],
  788. 'index0' => 0,
  789. 'index' => 1,
  790. 'first' => true,
  791. ];
  792. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  793. $length = count($context['_seq']);
  794. $context['loop']['revindex0'] = $length - 1;
  795. $context['loop']['revindex'] = $length;
  796. $context['loop']['length'] = $length;
  797. $context['loop']['last'] = 1 === $length;
  798. }
  799. foreach ($context['_seq'] as $context["_key"] => $context["classroom"]) {
  800. // line 523
  801. yield " ";
  802. // line 524
  803. yield " ";
  804. 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); })()))))) {
  805. // line 525
  806. yield " <tr>
  807. <td style=\"color:var(--ci-muted);font-size:12px\">";
  808. // line 526
  809. 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);
  810. yield "</td>
  811. <td>
  812. <a href=\"";
  813. // line 529
  814. 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);
  815. yield "\" class=\"room-link\">
  816. <span class=\"room-name\">";
  817. // line 530
  818. 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);
  819. yield "</span>
  820. </a>
  821. </td>
  822. <td>
  823. <span class=\"level-badge\">";
  824. // line 535
  825. 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);
  826. yield "</span>
  827. </td>
  828. <td>
  829. ";
  830. // line 539
  831. 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)) {
  832. // line 540
  833. yield " <div class=\"main-teacher\">
  834. <div class=\"teacher-avatar\">
  835. ";
  836. // line 542
  837. 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);
  838. 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);
  839. yield "
  840. </div>
  841. ";
  842. // line 544
  843. 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);
  844. yield "
  845. </div>
  846. ";
  847. } else {
  848. // line 547
  849. yield " <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
  850. ";
  851. }
  852. // line 549
  853. yield " </td>
  854. <td class=\"text-center\">
  855. <span style=\"font-weight:600;color:var(--ci-blue)\">";
  856. // line 552
  857. 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);
  858. yield "</span>
  859. </td>
  860. <td class=\"text-center\">
  861. ";
  862. // line 556
  863. $context["total_courses"] = 0;
  864. // line 557
  865. yield " ";
  866. $context['_parent'] = $context;
  867. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "modules", [], "any", false, false, false, 557));
  868. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  869. // line 558
  870. yield " ";
  871. $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)));
  872. // line 559
  873. yield " ";
  874. }
  875. $_parent = $context['_parent'];
  876. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  877. $context = array_intersect_key($context, $_parent) + $_parent;
  878. // line 560
  879. yield " <span style=\"font-weight:600;color:var(--ci-teal)\">";
  880. 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);
  881. yield "</span>
  882. </td>
  883. <td>
  884. <div class=\"ci-actions\">
  885. <a class=\"ci-btn ci-btn-primary\" href=\"";
  886. // line 565
  887. 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);
  888. yield "\" title=\"Voir\">
  889. <i class=\"fa fa-eye\"></i> Voir
  890. </a>
  891. ";
  892. // line 568
  893. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  894. // line 569
  895. yield " <a class=\"ci-btn ci-btn-warning\" href=\"";
  896. 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);
  897. yield "\" title=\"Modifier\">
  898. <i class=\"fa fa-pencil\"></i>
  899. </a>
  900. ";
  901. // line 572
  902. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 572, $this->source); })()) > 0)) {
  903. // line 573
  904. yield " <a class=\"ci-btn\" href=\"";
  905. 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);
  906. yield "\" title=\"Récapitulatif PDF\">
  907. <i class=\"fa fa-file-pdf-o\"></i>
  908. </a>
  909. ";
  910. }
  911. // line 577
  912. yield " <form method=\"post\" action=\"";
  913. 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);
  914. yield "\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
  915. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  916. <button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
  917. <i class=\"fa fa-trash\"></i>
  918. </button>
  919. </form>
  920. ";
  921. }
  922. // line 584
  923. yield " </div>
  924. </td>
  925. </tr>
  926. ";
  927. }
  928. // line 588
  929. yield " ";
  930. ++$context['loop']['index0'];
  931. ++$context['loop']['index'];
  932. $context['loop']['first'] = false;
  933. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  934. --$context['loop']['revindex0'];
  935. --$context['loop']['revindex'];
  936. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  937. }
  938. }
  939. $_parent = $context['_parent'];
  940. unset($context['_seq'], $context['_key'], $context['classroom'], $context['_parent'], $context['loop']);
  941. $context = array_intersect_key($context, $_parent) + $_parent;
  942. // line 589
  943. yield " </tbody>
  944. </table>
  945. </div>
  946. ";
  947. // line 594
  948. yield " ";
  949. 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)) {
  950. // line 595
  951. yield " <div class=\"ci-pagination\">
  952. <div class=\"ci-pagination__info\">
  953. Page ";
  954. // line 597
  955. 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);
  956. yield " sur ";
  957. 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);
  958. yield " — ";
  959. 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);
  960. yield " classe";
  961. 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") : (""));
  962. yield "
  963. </div>
  964. <ul class=\"ci-pager\">
  965. <li class=\"";
  966. // line 600
  967. 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") : (""));
  968. yield "\">
  969. ";
  970. // line 601
  971. 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)) {
  972. // line 602
  973. yield " <a href=\"?page=";
  974. 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);
  975. yield "\"><i class=\"fa fa-chevron-left\"></i></a>
  976. ";
  977. } else {
  978. // line 604
  979. yield " <span><i class=\"fa fa-chevron-left\"></i></span>
  980. ";
  981. }
  982. // line 606
  983. yield " </li>
  984. ";
  985. // line 607
  986. $context['_parent'] = $context;
  987. $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); })())));
  988. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  989. // line 608
  990. yield " ";
  991. 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); })()))) {
  992. // line 609
  993. yield " <li class=\"active\"><span>";
  994. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  995. yield "</span></li>
  996. ";
  997. } elseif (((( // line 610
  998. $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))))) {
  999. // line 611
  1000. yield " <li><a href=\"?page=";
  1001. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  1002. yield "\">";
  1003. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  1004. yield "</a></li>
  1005. ";
  1006. } elseif ((( // line 612
  1007. $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)))) {
  1008. // line 613
  1009. yield " <li><span style=\"border:none;background:transparent\">…</span></li>
  1010. ";
  1011. }
  1012. // line 615
  1013. yield " ";
  1014. }
  1015. $_parent = $context['_parent'];
  1016. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
  1017. $context = array_intersect_key($context, $_parent) + $_parent;
  1018. // line 616
  1019. yield " <li class=\"";
  1020. 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") : (""));
  1021. yield "\">
  1022. ";
  1023. // line 617
  1024. 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); })()))) {
  1025. // line 618
  1026. yield " <a href=\"?page=";
  1027. 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);
  1028. yield "\"><i class=\"fa fa-chevron-right\"></i></a>
  1029. ";
  1030. } else {
  1031. // line 620
  1032. yield " <span><i class=\"fa fa-chevron-right\"></i></span>
  1033. ";
  1034. }
  1035. // line 622
  1036. yield " </li>
  1037. </ul>
  1038. </div>
  1039. ";
  1040. } else {
  1041. // line 626
  1042. yield " <div class=\"ci-pagination\">
  1043. <div class=\"ci-pagination__info\">";
  1044. // line 627
  1045. 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);
  1046. yield " classe";
  1047. 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") : (""));
  1048. yield " au total</div>
  1049. </div>
  1050. ";
  1051. }
  1052. // line 630
  1053. yield "
  1054. ";
  1055. }
  1056. // line 632
  1057. yield " </div>
  1058. </div>
  1059. ";
  1060. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1061. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1062. yield from [];
  1063. }
  1064. /**
  1065. * @codeCoverageIgnore
  1066. */
  1067. public function getTemplateName(): string
  1068. {
  1069. return "classroom/index.html.twig";
  1070. }
  1071. /**
  1072. * @codeCoverageIgnore
  1073. */
  1074. public function isTraitable(): bool
  1075. {
  1076. return false;
  1077. }
  1078. /**
  1079. * @codeCoverageIgnore
  1080. */
  1081. public function getDebugInfo(): array
  1082. {
  1083. 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,);
  1084. }
  1085. public function getSourceContext(): Source
  1086. {
  1087. return new Source("{% extends 'layout/backEndLayout.html.twig' %}
  1088. {% block stylesheets %}
  1089. {{ parent() }}
  1090. <style>
  1091. /* ── Tokens locaux ─────────────────────────────────────────── */
  1092. :root {
  1093. --ci-bg : #f5f7fa;
  1094. --ci-card : #ffffff;
  1095. --ci-border : rgba(0,0,0,.08);
  1096. --ci-border-hi: rgba(0,0,0,.16);
  1097. --ci-ink : #111827;
  1098. --ci-dim : #4b5563;
  1099. --ci-muted : #9ca3af;
  1100. --ci-blue : #1d4ed8;
  1101. --ci-blue-lt : rgba(29,78,216,.1);
  1102. --ci-teal : #0d9488;
  1103. --ci-teal-lt : rgba(13,148,136,.1);
  1104. --ci-amber : #b45309;
  1105. --ci-amber-lt : rgba(180,83,9,.1);
  1106. --ci-rose : #be123c;
  1107. --ci-rose-lt : rgba(190,18,60,.1);
  1108. --ci-r : 12px;
  1109. --ci-rs : 8px;
  1110. --ci-shadow : 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  1111. }
  1112. /* ── Layout page ───────────────────────────────────────────── */
  1113. .ci-page { font-family:'DM Sans','Segoe UI',sans-serif; }
  1114. /* ── Barre de tête ─────────────────────────────────────────── */
  1115. .ci-topbar {
  1116. display: flex;
  1117. align-items: center;
  1118. justify-content: space-between;
  1119. flex-wrap: wrap;
  1120. gap: 12px;
  1121. margin-bottom: 24px;
  1122. }
  1123. .ci-topbar__title {
  1124. font-size: 20px;
  1125. font-weight: 700;
  1126. color: var(--ci-ink);
  1127. display: flex;
  1128. align-items: center;
  1129. gap: 10px;
  1130. }
  1131. .ci-topbar__title i { color: var(--ci-blue); font-size: 18px; }
  1132. .ci-topbar__sub { font-size: 13px; color: var(--ci-muted); margin-top: 2px; }
  1133. /* ── Statistiques globales ─────────────────────────────────── */
  1134. .ci-stats {
  1135. display: grid;
  1136. grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  1137. gap: 12px;
  1138. margin-bottom: 24px;
  1139. }
  1140. .ci-stat {
  1141. background: var(--ci-card);
  1142. border: 1px solid var(--ci-border);
  1143. border-radius: var(--ci-r);
  1144. padding: 16px;
  1145. display: flex;
  1146. align-items: center;
  1147. gap: 12px;
  1148. transition: box-shadow .2s;
  1149. }
  1150. .ci-stat:hover { box-shadow: var(--ci-shadow); }
  1151. .ci-stat__icon {
  1152. width: 40px; height: 40px;
  1153. border-radius: var(--ci-rs);
  1154. display: flex; align-items: center; justify-content: center;
  1155. font-size: 16px; flex-shrink: 0;
  1156. }
  1157. .ic-blue { background: var(--ci-blue-lt); color: var(--ci-blue); }
  1158. .ic-teal { background: var(--ci-teal-lt); color: var(--ci-teal); }
  1159. .ic-amber { background: var(--ci-amber-lt); color: var(--ci-amber); }
  1160. .ic-rose { background: var(--ci-rose-lt); color: var(--ci-rose); }
  1161. .ci-stat__val { font-size: 22px; font-weight: 700; color: var(--ci-ink); line-height: 1; }
  1162. .ci-stat__lbl { font-size: 11.5px; color: var(--ci-muted); margin-top: 2px; }
  1163. /* ── Tableau ───────────────────────────────────────────────── */
  1164. .ci-table-card {
  1165. background: var(--ci-card);
  1166. border: 1px solid var(--ci-border);
  1167. border-radius: var(--ci-r);
  1168. overflow: hidden;
  1169. box-shadow: var(--ci-shadow);
  1170. }
  1171. .ci-table-head {
  1172. display: flex;
  1173. align-items: center;
  1174. justify-content: space-between;
  1175. flex-wrap: wrap;
  1176. gap: 10px;
  1177. padding: 16px 20px;
  1178. border-bottom: 1px solid var(--ci-border);
  1179. background: #fafbfc;
  1180. }
  1181. .ci-table-head__title {
  1182. font-size: 14px;
  1183. font-weight: 600;
  1184. color: var(--ci-ink);
  1185. display: flex;
  1186. align-items: center;
  1187. gap: 8px;
  1188. }
  1189. .ci-table-head__dot {
  1190. width: 8px; height: 8px;
  1191. border-radius: 50%;
  1192. background: var(--ci-blue);
  1193. box-shadow: 0 0 6px var(--ci-blue);
  1194. }
  1195. /* Bouton ajouter */
  1196. .btn-add {
  1197. display: inline-flex;
  1198. align-items: center;
  1199. gap: 6px;
  1200. padding: 8px 16px;
  1201. background: var(--ci-blue);
  1202. color: #fff;
  1203. border-radius: var(--ci-rs);
  1204. font-size: 13px;
  1205. font-weight: 600;
  1206. text-decoration: none;
  1207. border: none;
  1208. cursor: pointer;
  1209. transition: background .18s, transform .14s;
  1210. }
  1211. .btn-add:hover { background: #1e40af; color: #fff; transform: translateY(-1px); }
  1212. /* Table */
  1213. table.ci-tbl {
  1214. width: 100%;
  1215. border-collapse: collapse;
  1216. font-size: 13.5px;
  1217. }
  1218. table.ci-tbl thead th {
  1219. padding: 10px 16px;
  1220. color: var(--ci-muted);
  1221. font-size: 11px;
  1222. font-weight: 600;
  1223. text-transform: uppercase;
  1224. letter-spacing: .06em;
  1225. background: #fafbfc;
  1226. border-bottom: 1px solid var(--ci-border);
  1227. white-space: nowrap;
  1228. }
  1229. table.ci-tbl tbody td {
  1230. padding: 12px 16px;
  1231. border-bottom: 1px solid rgba(0,0,0,.04);
  1232. color: var(--ci-ink);
  1233. vertical-align: middle;
  1234. }
  1235. table.ci-tbl tbody tr:last-child td { border-bottom: none; }
  1236. table.ci-tbl tbody tr { transition: background .12s; }
  1237. table.ci-tbl tbody tr:hover td { background: rgba(29,78,216,.03); }
  1238. /* Nom de la classe */
  1239. .room-name {
  1240. font-weight: 700;
  1241. font-size: 14px;
  1242. color: var(--ci-ink);
  1243. }
  1244. .room-link {
  1245. display: inline-flex;
  1246. align-items: center;
  1247. gap: 6px;
  1248. color: var(--ci-ink);
  1249. text-decoration: none;
  1250. }
  1251. .room-link:hover { color: var(--ci-blue); }
  1252. .room-link:hover .room-name { text-decoration: underline; }
  1253. /* Niveau badge */
  1254. .level-badge {
  1255. display: inline-block;
  1256. padding: 3px 10px;
  1257. border-radius: 20px;
  1258. font-size: 11.5px;
  1259. font-weight: 600;
  1260. background: var(--ci-blue-lt);
  1261. color: var(--ci-blue);
  1262. border: 1px solid rgba(29,78,216,.2);
  1263. }
  1264. /* Séquence active */
  1265. .seq-badge {
  1266. display: inline-flex;
  1267. align-items: center;
  1268. gap: 5px;
  1269. padding: 3px 10px;
  1270. border-radius: 20px;
  1271. font-size: 11px;
  1272. font-weight: 500;
  1273. background: var(--ci-teal-lt);
  1274. color: var(--ci-teal);
  1275. border: 1px solid rgba(13,148,136,.2);
  1276. }
  1277. .seq-dot {
  1278. width: 6px; height: 6px;
  1279. border-radius: 50%;
  1280. background: var(--ci-teal);
  1281. animation: pulse-dot 1.6s ease infinite;
  1282. }
  1283. @keyframes pulse-dot {
  1284. 0%,100% { opacity:1; } 50% { opacity:.35; }
  1285. }
  1286. /* Prof titulaire */
  1287. .main-teacher {
  1288. display: flex;
  1289. align-items: center;
  1290. gap: 7px;
  1291. font-size: 13px;
  1292. }
  1293. .teacher-avatar {
  1294. width: 26px; height: 26px;
  1295. border-radius: 50%;
  1296. background: linear-gradient(135deg, #1d4ed8, #0d9488);
  1297. color: #fff;
  1298. font-size: 10px;
  1299. font-weight: 700;
  1300. display: flex;
  1301. align-items: center;
  1302. justify-content: center;
  1303. flex-shrink: 0;
  1304. }
  1305. .no-teacher {
  1306. font-size: 12px;
  1307. color: var(--ci-rose);
  1308. font-style: italic;
  1309. }
  1310. /* Boutons action ligne */
  1311. .ci-actions {
  1312. display: flex;
  1313. align-items: center;
  1314. gap: 4px;
  1315. justify-content: flex-end;
  1316. }
  1317. .ci-btn {
  1318. display: inline-flex;
  1319. align-items: center;
  1320. gap: 5px;
  1321. padding: 5px 10px;
  1322. border-radius: 7px;
  1323. font-size: 11.5px;
  1324. font-weight: 500;
  1325. text-decoration: none;
  1326. border: 1px solid var(--ci-border);
  1327. cursor: pointer;
  1328. background: #fff;
  1329. color: var(--ci-dim);
  1330. transition: background .15s, border-color .15s, color .15s;
  1331. white-space: nowrap;
  1332. }
  1333. .ci-btn:hover { border-color: var(--ci-border-hi); color: var(--ci-ink); background: #f8f9fa; }
  1334. .ci-btn-primary { background: var(--ci-blue-lt); color: var(--ci-blue); border-color: rgba(29,78,216,.25); }
  1335. .ci-btn-primary:hover { background: #1d4ed8; color: #fff; }
  1336. .ci-btn-warning { background: var(--ci-amber-lt); color: var(--ci-amber); border-color: rgba(180,83,9,.25); }
  1337. .ci-btn-warning:hover { background: #b45309; color: #fff; }
  1338. .ci-btn-danger { background: var(--ci-rose-lt); color: var(--ci-rose); border-color: rgba(190,18,60,.25); }
  1339. .ci-btn-danger:hover { background: #be123c; color: #fff; }
  1340. /* ── Pagination ────────────────────────────────────────────── */
  1341. .ci-pagination {
  1342. display: flex;
  1343. align-items: center;
  1344. justify-content: space-between;
  1345. flex-wrap: wrap;
  1346. gap: 10px;
  1347. padding: 14px 20px;
  1348. border-top: 1px solid var(--ci-border);
  1349. background: #fafbfc;
  1350. }
  1351. .ci-pagination__info { font-size: 12.5px; color: var(--ci-muted); }
  1352. .ci-pager {
  1353. display: flex;
  1354. align-items: center;
  1355. gap: 4px;
  1356. list-style: none;
  1357. margin: 0; padding: 0;
  1358. }
  1359. .ci-pager li a,
  1360. .ci-pager li span {
  1361. display: inline-flex;
  1362. align-items: center;
  1363. justify-content: center;
  1364. min-width: 34px;
  1365. height: 34px;
  1366. padding: 0 8px;
  1367. border-radius: 8px;
  1368. border: 1px solid var(--ci-border);
  1369. font-size: 13px;
  1370. font-weight: 500;
  1371. color: var(--ci-dim);
  1372. text-decoration: none;
  1373. background: #fff;
  1374. transition: background .15s, border-color .15s, color .15s;
  1375. }
  1376. .ci-pager li a:hover { border-color: var(--ci-blue); color: var(--ci-blue); }
  1377. .ci-pager li.active span {
  1378. background: var(--ci-blue);
  1379. color: #fff;
  1380. border-color: var(--ci-blue);
  1381. font-weight: 700;
  1382. }
  1383. .ci-pager li.disabled span { opacity: .4; cursor: default; }
  1384. /* ── Vide ──────────────────────────────────────────────────── */
  1385. .ci-empty {
  1386. text-align: center;
  1387. padding: 64px 24px;
  1388. color: var(--ci-muted);
  1389. }
  1390. .ci-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
  1391. .ci-empty strong { display: block; font-size: 15px; color: var(--ci-dim); margin-bottom: 4px; }
  1392. /* ── Animation ─────────────────────────────────────────────── */
  1393. @keyframes fadeUp {
  1394. from { opacity:0; transform:translateY(10px); }
  1395. to { opacity:1; transform:none; }
  1396. }
  1397. .ci-table-card { animation: fadeUp .4s ease both; }
  1398. </style>
  1399. {% endblock %}
  1400. {% block content %}
  1401. <div class=\"container mt-4\">
  1402. <div class=\"d-flex justify-content-between align-items-center mb-3\">
  1403. <h4 class=\"text-uppercase\">Liste des salles de classe</h4>
  1404. {% if is_granted('ROLE_ADMIN') %}
  1405. <a class=\"btn btn-info\" href=\"{{ path('admin_classrooms_new') }}\">
  1406. <i class=\"fa fa-plus\"></i> Ajouter
  1407. </a>
  1408. {% endif %}
  1409. </div>
  1410. <!-- Level Tabs -->
  1411. <ul class=\"nav nav-tabs\" id=\"levelTabs\" role=\"tablist\">
  1412. {% for level in levels %}
  1413. <li class=\"nav-item\" role=\"presentation\">
  1414. <button class=\"nav-link {% if loop.first %}active{% endif %}\" id=\"level-{{ level.id }}-tab\"
  1415. data-bs-toggle=\"tab\" data-bs-target=\"#level-{{ level.id }}\" type=\"button\"
  1416. role=\"tab\" aria-controls=\"level-{{ level.id }}\" aria-selected=\"{{ loop.first ? 'true' : 'false' }}\">
  1417. {{ level.fullName }}
  1418. </button>
  1419. </li>
  1420. {% endfor %}
  1421. </ul>
  1422. <!-- Classes per Level -->
  1423. <div class=\"tab-content mt-3\" id=\"levelTabsContent\">
  1424. {% for level in levels %}
  1425. <div class=\"tab-pane fade {% if loop.first %}show active{% endif %}\" id=\"level-{{ level.id }}\" role=\"tabpanel\">
  1426. {% if level.rooms|length > 0 %}
  1427. <!-- Random Color Header -->
  1428. {# pick a random color #}
  1429. {% set colors = ['#ff7a00', '#2f2f2f', '#28a745', '#009688', '#6f42c1'] %}
  1430. {% set color = random(colors) %}
  1431. <div class=\"level-header\" style=\"background-color: {{ color }};\">
  1432. <h5 class=\"m-0 text-white text-uppercase fw-bold level-title\">
  1433. {{ level.fullName }}
  1434. </h5>
  1435. </div>
  1436. <div class=\"classroom-grid mt-3\">
  1437. {% for room in level.rooms %}
  1438. <div class=\"classroom-card shadow-sm\">
  1439. <div class=\"card-header mb-2\">
  1440. <h5 class=\"mb-1 classroom-title\">
  1441. <a href=\"{{ path('admin_classrooms_show', {id: room.id}) }}\">
  1442. {{ room.name }}
  1443. </a>
  1444. </h5>
  1445. {% if room.id in mainTeachers|keys %}
  1446. <small class=\"text-muted\">
  1447. <i class=\"fa fa-user\"></i> {{ mainTeachers[room.id].fullName }}
  1448. </small>
  1449. {% else %}
  1450. <small class=\"text-danger\">— Pas de titulaire —</small>
  1451. {% endif %}
  1452. </div>
  1453. <!-- Flex Buttons -->
  1454. <div class=\"card-actions mt-3\">
  1455. {% if is_granted('ROLE_ADMIN') %}
  1456. <a class=\"btn btn-outline-warning\" href=\"{{ path('admin_classrooms_edit', {id: room.id}) }}\">
  1457. <i class=\"fa fa-edit\"></i> Modifier
  1458. </a>
  1459. <a class=\"btn btn-outline-dark\" target=\"_blank\" href=\"{{ path('admin_classroom_insolvent', {id: room.id}) }}\">
  1460. <i class=\"fa fa-users\"></i> Débiteurs
  1461. </a>
  1462. <a class=\"btn btn-outline-success\" target=\"_blank\" href=\"{{ path('admin_payment_plan_print', {id: room.id}) }}\">
  1463. <i class=\"fa fa-money\"></i> Échéancier
  1464. </a>
  1465. {% endif %}
  1466. <a class=\"btn btn-outline-danger\" target=\"_blank\" href=\"{{ path('admin_classrooms_fichesimple', {id: room.id}) }}\">
  1467. <i class=\"fa fa-file-pdf-o\"></i> Notes
  1468. </a>
  1469. <a class=\"btn btn-outline-info\" target=\"_blank\" href=\"{{ path('admin_classrooms_presentation', {id: room.id}) }}\">
  1470. <i class=\"fa fa-users\"></i> Présentation
  1471. </a>
  1472. <a class=\"btn btn-outline-primary\" target=\"_blank\" href=\"{{ path('admin_classrooms_recapitulatif', {room: room.id, seq : seq}) }}\">
  1473. <i class=\"fa fa-file\"></i> Récap.
  1474. </a>
  1475. <a class=\"btn btn-outline-secondary\" target=\"_blank\" href=\"{{ path('admin_classrooms_disciplinary_record', {id: room.id}) }}\">
  1476. <i class=\"fa fa-th-list\"></i> Discipline
  1477. </a>
  1478. </div>
  1479. </div>
  1480. {% endfor %}
  1481. </div>
  1482. {% else %}
  1483. <div class=\"alert alert-warning mt-3\">Aucune classe trouvée pour ce niveau.</div>
  1484. {% endif %}
  1485. </div>
  1486. {% endfor %}
  1487. </div>
  1488. <div class=\"ci-page\">
  1489. {# ── Barre de tête ──────────────────────────────────────────── #}
  1490. <div class=\"ci-topbar\">
  1491. <div>
  1492. <div class=\"ci-topbar__title\">
  1493. <i class=\"fa fa-th-large\"></i>
  1494. Classes
  1495. </div>
  1496. <div class=\"ci-topbar__sub\">
  1497. Gestion des classes — {% if year %}Année scolaire {{ year.code }}{% endif %}
  1498. {% if seq > 0 %} · Séquence active{% endif %}
  1499. </div>
  1500. </div>
  1501. {% if is_granted('ROLE_ADMIN') %}
  1502. <a href=\"{{ path('admin_classrooms_new') }}\" class=\"btn-add\">
  1503. <i class=\"fa fa-plus\"></i> Nouvelle classe
  1504. </a>
  1505. {% endif %}
  1506. </div>
  1507. {# ── KPIs globaux ───────────────────────────────────────────── #}
  1508. <div class=\"ci-stats\">
  1509. <div class=\"ci-stat\">
  1510. <div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
  1511. <div>
  1512. <div class=\"ci-stat__val\">{{ classrooms|length }}</div>
  1513. <div class=\"ci-stat__lbl\">Classes</div>
  1514. </div>
  1515. </div>
  1516. <div class=\"ci-stat\">
  1517. <div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
  1518. <div>
  1519. <div class=\"ci-stat__val\">{{ students_count() }}</div>
  1520. <div class=\"ci-stat__lbl\">Élèves inscrits</div>
  1521. </div>
  1522. </div>
  1523. <div class=\"ci-stat\">
  1524. <div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
  1525. <div>
  1526. <div class=\"ci-stat__val\">{{ teachers_count() }}</div>
  1527. <div class=\"ci-stat__lbl\">Enseignants</div>
  1528. </div>
  1529. </div>
  1530. <div class=\"ci-stat\">
  1531. <div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
  1532. <div>
  1533. <div class=\"ci-stat__val\">{{ rooms_count() }}</div>
  1534. <div class=\"ci-stat__lbl\">Salles actives</div>
  1535. </div>
  1536. </div>
  1537. </div>
  1538. {# ── Tableau des classes ─────────────────────────────────────── #}
  1539. {% set items_per_page = 12 %}
  1540. {% set current_page = app.request.query.get('page', 1)|number_format %}
  1541. {% set total_pages = (classrooms|length / items_per_page)|round(0, 'ceil') %}
  1542. <div class=\"ci-table-card\">
  1543. <div class=\"ci-table-head\">
  1544. <div class=\"ci-table-head__title\">
  1545. <span class=\"ci-table-head__dot\"></span>
  1546. Liste des classes
  1547. <span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">({{ classrooms|length }} au total)</span>
  1548. </div>
  1549. <div style=\"display:flex;gap:8px;align-items:center;\">
  1550. <span class=\"seq-badge\">
  1551. <span class=\"seq-dot\"></span>
  1552. {% if seq > 0 %}Séquence active{% else %}Aucune séquence active{% endif %}
  1553. </span>
  1554. </div>
  1555. </div>
  1556. {% if classrooms is empty %}
  1557. <div class=\"ci-empty\">
  1558. <i class=\"fa fa-inbox\"></i>
  1559. <strong>Aucune classe enregistrée</strong>
  1560. Commencez par créer une classe.
  1561. </div>
  1562. {% else %}
  1563. <div style=\"overflow-x:auto;\">
  1564. <table class=\"ci-tbl\">
  1565. <thead>
  1566. <tr>
  1567. <th style=\"width:4%\">#</th>
  1568. <th style=\"width:18%\">Classe</th>
  1569. <th style=\"width:12%\">Niveau</th>
  1570. <th style=\"width:22%\">Professeur titulaire</th>
  1571. <th style=\"width:10%\" class=\"text-center\">Modules</th>
  1572. <th style=\"width:10%\" class=\"text-center\">Matières</th>
  1573. <th style=\"width:24%\" class=\"text-right\">Actions</th>
  1574. </tr>
  1575. </thead>
  1576. <tbody>
  1577. {% for classroom in classrooms %}
  1578. {# ── Pagination côté Twig ── #}
  1579. {% if loop.index > (current_page - 1) * items_per_page and loop.index <= current_page * items_per_page %}
  1580. <tr>
  1581. <td style=\"color:var(--ci-muted);font-size:12px\">{{ (current_page - 1) * items_per_page + loop.index - ((current_page - 1) * items_per_page) }}</td>
  1582. <td>
  1583. <a href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" class=\"room-link\">
  1584. <span class=\"room-name\">{{ classroom.name }}</span>
  1585. </a>
  1586. </td>
  1587. <td>
  1588. <span class=\"level-badge\">{{ classroom.level }}</span>
  1589. </td>
  1590. <td>
  1591. {% if mainTeachers[classroom.id] is defined %}
  1592. <div class=\"main-teacher\">
  1593. <div class=\"teacher-avatar\">
  1594. {{ mainTeachers[classroom.id].fullName|slice(0,1)|upper }}{{ mainTeachers[classroom.id].fullName|split(' ')|last|slice(0,1)|upper }}
  1595. </div>
  1596. {{ mainTeachers[classroom.id].fullName }}
  1597. </div>
  1598. {% else %}
  1599. <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
  1600. {% endif %}
  1601. </td>
  1602. <td class=\"text-center\">
  1603. <span style=\"font-weight:600;color:var(--ci-blue)\">{{ classroom.modules|length }}</span>
  1604. </td>
  1605. <td class=\"text-center\">
  1606. {% set total_courses = 0 %}
  1607. {% for module in classroom.modules %}
  1608. {% set total_courses = total_courses + module.courses|length %}
  1609. {% endfor %}
  1610. <span style=\"font-weight:600;color:var(--ci-teal)\">{{ total_courses }}</span>
  1611. </td>
  1612. <td>
  1613. <div class=\"ci-actions\">
  1614. <a class=\"ci-btn ci-btn-primary\" href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" title=\"Voir\">
  1615. <i class=\"fa fa-eye\"></i> Voir
  1616. </a>
  1617. {% if is_granted('ROLE_ADMIN') %}
  1618. <a class=\"ci-btn ci-btn-warning\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\" title=\"Modifier\">
  1619. <i class=\"fa fa-pencil\"></i>
  1620. </a>
  1621. {% if seq > 0 %}
  1622. <a class=\"ci-btn\" href=\"{{ path('admin_classrooms_recapitulatif', {room: classroom.id, seq: seq}) }}\" title=\"Récapitulatif PDF\">
  1623. <i class=\"fa fa-file-pdf-o\"></i>
  1624. </a>
  1625. {% endif %}
  1626. <form method=\"post\" action=\"{{ path('admin_classrooms_delete', {id: classroom.id}) }}\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
  1627. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  1628. <button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
  1629. <i class=\"fa fa-trash\"></i>
  1630. </button>
  1631. </form>
  1632. {% endif %}
  1633. </div>
  1634. </td>
  1635. </tr>
  1636. {% endif %}
  1637. {% endfor %}
  1638. </tbody>
  1639. </table>
  1640. </div>
  1641. {# ── Pagination ────────────────────────────────────────────── #}
  1642. {% if total_pages > 1 %}
  1643. <div class=\"ci-pagination\">
  1644. <div class=\"ci-pagination__info\">
  1645. Page {{ current_page }} sur {{ total_pages }} — {{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }}
  1646. </div>
  1647. <ul class=\"ci-pager\">
  1648. <li class=\"{{ current_page <= 1 ? 'disabled' : '' }}\">
  1649. {% if current_page > 1 %}
  1650. <a href=\"?page={{ current_page - 1 }}\"><i class=\"fa fa-chevron-left\"></i></a>
  1651. {% else %}
  1652. <span><i class=\"fa fa-chevron-left\"></i></span>
  1653. {% endif %}
  1654. </li>
  1655. {% for p in 1..total_pages %}
  1656. {% if p == current_page %}
  1657. <li class=\"active\"><span>{{ p }}</span></li>
  1658. {% elseif p == 1 or p == total_pages or (p >= current_page - 2 and p <= current_page + 2) %}
  1659. <li><a href=\"?page={{ p }}\">{{ p }}</a></li>
  1660. {% elseif p == current_page - 3 or p == current_page + 3 %}
  1661. <li><span style=\"border:none;background:transparent\">…</span></li>
  1662. {% endif %}
  1663. {% endfor %}
  1664. <li class=\"{{ current_page >= total_pages ? 'disabled' : '' }}\">
  1665. {% if current_page < total_pages %}
  1666. <a href=\"?page={{ current_page + 1 }}\"><i class=\"fa fa-chevron-right\"></i></a>
  1667. {% else %}
  1668. <span><i class=\"fa fa-chevron-right\"></i></span>
  1669. {% endif %}
  1670. </li>
  1671. </ul>
  1672. </div>
  1673. {% else %}
  1674. <div class=\"ci-pagination\">
  1675. <div class=\"ci-pagination__info\">{{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }} au total</div>
  1676. </div>
  1677. {% endif %}
  1678. {% endif %}
  1679. </div>
  1680. </div>
  1681. {% endblock %}
  1682. ", "classroom/index.html.twig", "/var/www/bethesda/templates/classroom/index.html.twig");
  1683. }
  1684. }