var/cache/dev/twig/a3/a38e75700a3051322564a89154837162.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_f44a3cee19d19dd362993b95ca3c1ff1 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=\"ci-page\">
  390. ";
  391. // line 334
  392. yield " <div class=\"ci-topbar\">
  393. <div>
  394. <div class=\"ci-topbar__title\">
  395. <i class=\"fa fa-th-large\"></i>
  396. Classes
  397. </div>
  398. <div class=\"ci-topbar__sub\">
  399. Gestion des classes — ";
  400. // line 341
  401. 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)) {
  402. yield "Année scolaire ";
  403. 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);
  404. }
  405. // line 342
  406. yield " ";
  407. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 342, $this->source); })()) > 0)) {
  408. yield " · Séquence active";
  409. }
  410. // line 343
  411. yield " </div>
  412. </div>
  413. ";
  414. // line 345
  415. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  416. // line 346
  417. yield " <a href=\"";
  418. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
  419. yield "\" class=\"btn-add\">
  420. <i class=\"fa fa-plus\"></i> Nouvelle classe
  421. </a>
  422. ";
  423. }
  424. // line 350
  425. yield " </div>
  426. ";
  427. // line 353
  428. yield " <div class=\"ci-stats\">
  429. <div class=\"ci-stat\">
  430. <div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
  431. <div>
  432. <div class=\"ci-stat__val\">";
  433. // line 357
  434. 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);
  435. yield "</div>
  436. <div class=\"ci-stat__lbl\">Classes</div>
  437. </div>
  438. </div>
  439. <div class=\"ci-stat\">
  440. <div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
  441. <div>
  442. <div class=\"ci-stat__val\">";
  443. // line 364
  444. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->students(), "html", null, true);
  445. yield "</div>
  446. <div class=\"ci-stat__lbl\">Élèves inscrits</div>
  447. </div>
  448. </div>
  449. <div class=\"ci-stat\">
  450. <div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
  451. <div>
  452. <div class=\"ci-stat__val\">";
  453. // line 371
  454. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->teachers(), "html", null, true);
  455. yield "</div>
  456. <div class=\"ci-stat__lbl\">Enseignants</div>
  457. </div>
  458. </div>
  459. <div class=\"ci-stat\">
  460. <div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
  461. <div>
  462. <div class=\"ci-stat__val\">";
  463. // line 378
  464. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\StatExtension']->rooms(), "html", null, true);
  465. yield "</div>
  466. <div class=\"ci-stat__lbl\">Salles actives</div>
  467. </div>
  468. </div>
  469. </div>
  470. ";
  471. // line 385
  472. yield " ";
  473. $context["items_per_page"] = 12;
  474. // line 386
  475. yield " ";
  476. $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));
  477. // line 387
  478. yield " ";
  479. $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");
  480. // line 388
  481. yield "
  482. <div class=\"ci-table-card\">
  483. <div class=\"ci-table-head\">
  484. <div class=\"ci-table-head__title\">
  485. <span class=\"ci-table-head__dot\"></span>
  486. Liste des classes
  487. <span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">(";
  488. // line 394
  489. 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);
  490. yield " au total)</span>
  491. </div>
  492. <div style=\"display:flex;gap:8px;align-items:center;\">
  493. <span class=\"seq-badge\">
  494. <span class=\"seq-dot\"></span>
  495. ";
  496. // line 399
  497. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 399, $this->source); })()) > 0)) {
  498. yield "Séquence active";
  499. } else {
  500. yield "Aucune séquence active";
  501. }
  502. // line 400
  503. yield " </span>
  504. </div>
  505. </div>
  506. ";
  507. // line 404
  508. 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); })()))) {
  509. // line 405
  510. yield " <div class=\"ci-empty\">
  511. <i class=\"fa fa-inbox\"></i>
  512. <strong>Aucune classe enregistrée</strong>
  513. Commencez par créer une classe.
  514. </div>
  515. ";
  516. } else {
  517. // line 411
  518. yield " <div style=\"overflow-x:auto;\">
  519. <table class=\"ci-tbl\">
  520. <thead>
  521. <tr>
  522. <th style=\"width:4%\">#</th>
  523. <th style=\"width:18%\">Classe</th>
  524. <th style=\"width:12%\">Niveau</th>
  525. <th style=\"width:22%\">Professeur titulaire</th>
  526. <th style=\"width:10%\" class=\"text-center\">Modules</th>
  527. <th style=\"width:10%\" class=\"text-center\">Matières</th>
  528. <th style=\"width:24%\" class=\"text-right\">Actions</th>
  529. </tr>
  530. </thead>
  531. <tbody>
  532. ";
  533. // line 425
  534. $context['_parent'] = $context;
  535. $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); })()));
  536. $context['loop'] = [
  537. 'parent' => $context['_parent'],
  538. 'index0' => 0,
  539. 'index' => 1,
  540. 'first' => true,
  541. ];
  542. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  543. $length = count($context['_seq']);
  544. $context['loop']['revindex0'] = $length - 1;
  545. $context['loop']['revindex'] = $length;
  546. $context['loop']['length'] = $length;
  547. $context['loop']['last'] = 1 === $length;
  548. }
  549. foreach ($context['_seq'] as $context["_key"] => $context["classroom"]) {
  550. // line 426
  551. yield " ";
  552. // line 427
  553. yield " ";
  554. 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); })()))))) {
  555. // line 428
  556. yield " <tr>
  557. <td style=\"color:var(--ci-muted);font-size:12px\">";
  558. // line 429
  559. 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);
  560. yield "</td>
  561. <td>
  562. <a href=\"";
  563. // line 432
  564. 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);
  565. yield "\" class=\"room-link\">
  566. <span class=\"room-name\">";
  567. // line 433
  568. 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);
  569. yield "</span>
  570. </a>
  571. </td>
  572. <td>
  573. <span class=\"level-badge\">";
  574. // line 438
  575. 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);
  576. yield "</span>
  577. </td>
  578. <td>
  579. ";
  580. // line 442
  581. 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)) {
  582. // line 443
  583. yield " <div class=\"main-teacher\">
  584. <div class=\"teacher-avatar\">
  585. ";
  586. // line 445
  587. 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);
  588. 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);
  589. yield "
  590. </div>
  591. ";
  592. // line 447
  593. 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);
  594. yield "
  595. </div>
  596. ";
  597. } else {
  598. // line 450
  599. yield " <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
  600. ";
  601. }
  602. // line 452
  603. yield " </td>
  604. <td class=\"text-center\">
  605. <span style=\"font-weight:600;color:var(--ci-blue)\">";
  606. // line 455
  607. 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);
  608. yield "</span>
  609. </td>
  610. <td class=\"text-center\">
  611. ";
  612. // line 459
  613. $context["total_courses"] = 0;
  614. // line 460
  615. yield " ";
  616. $context['_parent'] = $context;
  617. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["classroom"], "modules", [], "any", false, false, false, 460));
  618. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  619. // line 461
  620. yield " ";
  621. $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)));
  622. // line 462
  623. yield " ";
  624. }
  625. $_parent = $context['_parent'];
  626. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  627. $context = array_intersect_key($context, $_parent) + $_parent;
  628. // line 463
  629. yield " <span style=\"font-weight:600;color:var(--ci-teal)\">";
  630. 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);
  631. yield "</span>
  632. </td>
  633. <td>
  634. <div class=\"ci-actions\">
  635. <a class=\"ci-btn ci-btn-primary\" href=\"";
  636. // line 468
  637. 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);
  638. yield "\" title=\"Voir\">
  639. <i class=\"fa fa-eye\"></i> Voir
  640. </a>
  641. ";
  642. // line 471
  643. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  644. // line 472
  645. yield " <a class=\"ci-btn ci-btn-warning\" href=\"";
  646. 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);
  647. yield "\" title=\"Modifier\">
  648. <i class=\"fa fa-pencil\"></i>
  649. </a>
  650. ";
  651. // line 475
  652. if (((isset($context["seq"]) || array_key_exists("seq", $context) ? $context["seq"] : (function () { throw new RuntimeError('Variable "seq" does not exist.', 475, $this->source); })()) > 0)) {
  653. // line 476
  654. yield " <a class=\"ci-btn\" href=\"";
  655. 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);
  656. yield "\" title=\"Récapitulatif PDF\">
  657. <i class=\"fa fa-file-pdf-o\"></i>
  658. </a>
  659. ";
  660. }
  661. // line 480
  662. yield " <form method=\"post\" action=\"";
  663. 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);
  664. yield "\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
  665. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  666. <button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
  667. <i class=\"fa fa-trash\"></i>
  668. </button>
  669. </form>
  670. ";
  671. }
  672. // line 487
  673. yield " </div>
  674. </td>
  675. </tr>
  676. ";
  677. }
  678. // line 491
  679. yield " ";
  680. ++$context['loop']['index0'];
  681. ++$context['loop']['index'];
  682. $context['loop']['first'] = false;
  683. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  684. --$context['loop']['revindex0'];
  685. --$context['loop']['revindex'];
  686. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  687. }
  688. }
  689. $_parent = $context['_parent'];
  690. unset($context['_seq'], $context['_key'], $context['classroom'], $context['_parent'], $context['loop']);
  691. $context = array_intersect_key($context, $_parent) + $_parent;
  692. // line 492
  693. yield " </tbody>
  694. </table>
  695. </div>
  696. ";
  697. // line 497
  698. yield " ";
  699. 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)) {
  700. // line 498
  701. yield " <div class=\"ci-pagination\">
  702. <div class=\"ci-pagination__info\">
  703. Page ";
  704. // line 500
  705. 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);
  706. yield " sur ";
  707. 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);
  708. yield " — ";
  709. 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);
  710. yield " classe";
  711. 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") : (""));
  712. yield "
  713. </div>
  714. <ul class=\"ci-pager\">
  715. <li class=\"";
  716. // line 503
  717. 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") : (""));
  718. yield "\">
  719. ";
  720. // line 504
  721. 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)) {
  722. // line 505
  723. yield " <a href=\"?page=";
  724. 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);
  725. yield "\"><i class=\"fa fa-chevron-left\"></i></a>
  726. ";
  727. } else {
  728. // line 507
  729. yield " <span><i class=\"fa fa-chevron-left\"></i></span>
  730. ";
  731. }
  732. // line 509
  733. yield " </li>
  734. ";
  735. // line 510
  736. $context['_parent'] = $context;
  737. $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); })())));
  738. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  739. // line 511
  740. yield " ";
  741. 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); })()))) {
  742. // line 512
  743. yield " <li class=\"active\"><span>";
  744. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  745. yield "</span></li>
  746. ";
  747. } elseif (((( // line 513
  748. $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))))) {
  749. // line 514
  750. yield " <li><a href=\"?page=";
  751. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  752. yield "\">";
  753. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
  754. yield "</a></li>
  755. ";
  756. } elseif ((( // line 515
  757. $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)))) {
  758. // line 516
  759. yield " <li><span style=\"border:none;background:transparent\">…</span></li>
  760. ";
  761. }
  762. // line 518
  763. yield " ";
  764. }
  765. $_parent = $context['_parent'];
  766. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent']);
  767. $context = array_intersect_key($context, $_parent) + $_parent;
  768. // line 519
  769. yield " <li class=\"";
  770. 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") : (""));
  771. yield "\">
  772. ";
  773. // line 520
  774. 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); })()))) {
  775. // line 521
  776. yield " <a href=\"?page=";
  777. 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);
  778. yield "\"><i class=\"fa fa-chevron-right\"></i></a>
  779. ";
  780. } else {
  781. // line 523
  782. yield " <span><i class=\"fa fa-chevron-right\"></i></span>
  783. ";
  784. }
  785. // line 525
  786. yield " </li>
  787. </ul>
  788. </div>
  789. ";
  790. } else {
  791. // line 529
  792. yield " <div class=\"ci-pagination\">
  793. <div class=\"ci-pagination__info\">";
  794. // line 530
  795. 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);
  796. yield " classe";
  797. 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") : (""));
  798. yield " au total</div>
  799. </div>
  800. ";
  801. }
  802. // line 533
  803. yield "
  804. ";
  805. }
  806. // line 535
  807. yield " </div>
  808. </div>
  809. ";
  810. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  811. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  812. yield from [];
  813. }
  814. /**
  815. * @codeCoverageIgnore
  816. */
  817. public function getTemplateName(): string
  818. {
  819. return "classroom/index.html.twig";
  820. }
  821. /**
  822. * @codeCoverageIgnore
  823. */
  824. public function isTraitable(): bool
  825. {
  826. return false;
  827. }
  828. /**
  829. * @codeCoverageIgnore
  830. */
  831. public function getDebugInfo(): array
  832. {
  833. 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,);
  834. }
  835. public function getSourceContext(): Source
  836. {
  837. return new Source("{% extends 'layout/backEndLayout.html.twig' %}
  838. {% block stylesheets %}
  839. {{ parent() }}
  840. <style>
  841. /* ── Tokens locaux ─────────────────────────────────────────── */
  842. :root {
  843. --ci-bg : #f5f7fa;
  844. --ci-card : #ffffff;
  845. --ci-border : rgba(0,0,0,.08);
  846. --ci-border-hi: rgba(0,0,0,.16);
  847. --ci-ink : #111827;
  848. --ci-dim : #4b5563;
  849. --ci-muted : #9ca3af;
  850. --ci-blue : #1d4ed8;
  851. --ci-blue-lt : rgba(29,78,216,.1);
  852. --ci-teal : #0d9488;
  853. --ci-teal-lt : rgba(13,148,136,.1);
  854. --ci-amber : #b45309;
  855. --ci-amber-lt : rgba(180,83,9,.1);
  856. --ci-rose : #be123c;
  857. --ci-rose-lt : rgba(190,18,60,.1);
  858. --ci-r : 12px;
  859. --ci-rs : 8px;
  860. --ci-shadow : 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  861. }
  862. /* ── Layout page ───────────────────────────────────────────── */
  863. .ci-page { font-family:'DM Sans','Segoe UI',sans-serif; }
  864. /* ── Barre de tête ─────────────────────────────────────────── */
  865. .ci-topbar {
  866. display: flex;
  867. align-items: center;
  868. justify-content: space-between;
  869. flex-wrap: wrap;
  870. gap: 12px;
  871. margin-bottom: 24px;
  872. }
  873. .ci-topbar__title {
  874. font-size: 20px;
  875. font-weight: 700;
  876. color: var(--ci-ink);
  877. display: flex;
  878. align-items: center;
  879. gap: 10px;
  880. }
  881. .ci-topbar__title i { color: var(--ci-blue); font-size: 18px; }
  882. .ci-topbar__sub { font-size: 13px; color: var(--ci-muted); margin-top: 2px; }
  883. /* ── Statistiques globales ─────────────────────────────────── */
  884. .ci-stats {
  885. display: grid;
  886. grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  887. gap: 12px;
  888. margin-bottom: 24px;
  889. }
  890. .ci-stat {
  891. background: var(--ci-card);
  892. border: 1px solid var(--ci-border);
  893. border-radius: var(--ci-r);
  894. padding: 16px;
  895. display: flex;
  896. align-items: center;
  897. gap: 12px;
  898. transition: box-shadow .2s;
  899. }
  900. .ci-stat:hover { box-shadow: var(--ci-shadow); }
  901. .ci-stat__icon {
  902. width: 40px; height: 40px;
  903. border-radius: var(--ci-rs);
  904. display: flex; align-items: center; justify-content: center;
  905. font-size: 16px; flex-shrink: 0;
  906. }
  907. .ic-blue { background: var(--ci-blue-lt); color: var(--ci-blue); }
  908. .ic-teal { background: var(--ci-teal-lt); color: var(--ci-teal); }
  909. .ic-amber { background: var(--ci-amber-lt); color: var(--ci-amber); }
  910. .ic-rose { background: var(--ci-rose-lt); color: var(--ci-rose); }
  911. .ci-stat__val { font-size: 22px; font-weight: 700; color: var(--ci-ink); line-height: 1; }
  912. .ci-stat__lbl { font-size: 11.5px; color: var(--ci-muted); margin-top: 2px; }
  913. /* ── Tableau ───────────────────────────────────────────────── */
  914. .ci-table-card {
  915. background: var(--ci-card);
  916. border: 1px solid var(--ci-border);
  917. border-radius: var(--ci-r);
  918. overflow: hidden;
  919. box-shadow: var(--ci-shadow);
  920. }
  921. .ci-table-head {
  922. display: flex;
  923. align-items: center;
  924. justify-content: space-between;
  925. flex-wrap: wrap;
  926. gap: 10px;
  927. padding: 16px 20px;
  928. border-bottom: 1px solid var(--ci-border);
  929. background: #fafbfc;
  930. }
  931. .ci-table-head__title {
  932. font-size: 14px;
  933. font-weight: 600;
  934. color: var(--ci-ink);
  935. display: flex;
  936. align-items: center;
  937. gap: 8px;
  938. }
  939. .ci-table-head__dot {
  940. width: 8px; height: 8px;
  941. border-radius: 50%;
  942. background: var(--ci-blue);
  943. box-shadow: 0 0 6px var(--ci-blue);
  944. }
  945. /* Bouton ajouter */
  946. .btn-add {
  947. display: inline-flex;
  948. align-items: center;
  949. gap: 6px;
  950. padding: 8px 16px;
  951. background: var(--ci-blue);
  952. color: #fff;
  953. border-radius: var(--ci-rs);
  954. font-size: 13px;
  955. font-weight: 600;
  956. text-decoration: none;
  957. border: none;
  958. cursor: pointer;
  959. transition: background .18s, transform .14s;
  960. }
  961. .btn-add:hover { background: #1e40af; color: #fff; transform: translateY(-1px); }
  962. /* Table */
  963. table.ci-tbl {
  964. width: 100%;
  965. border-collapse: collapse;
  966. font-size: 13.5px;
  967. }
  968. table.ci-tbl thead th {
  969. padding: 10px 16px;
  970. color: var(--ci-muted);
  971. font-size: 11px;
  972. font-weight: 600;
  973. text-transform: uppercase;
  974. letter-spacing: .06em;
  975. background: #fafbfc;
  976. border-bottom: 1px solid var(--ci-border);
  977. white-space: nowrap;
  978. }
  979. table.ci-tbl tbody td {
  980. padding: 12px 16px;
  981. border-bottom: 1px solid rgba(0,0,0,.04);
  982. color: var(--ci-ink);
  983. vertical-align: middle;
  984. }
  985. table.ci-tbl tbody tr:last-child td { border-bottom: none; }
  986. table.ci-tbl tbody tr { transition: background .12s; }
  987. table.ci-tbl tbody tr:hover td { background: rgba(29,78,216,.03); }
  988. /* Nom de la classe */
  989. .room-name {
  990. font-weight: 700;
  991. font-size: 14px;
  992. color: var(--ci-ink);
  993. }
  994. .room-link {
  995. display: inline-flex;
  996. align-items: center;
  997. gap: 6px;
  998. color: var(--ci-ink);
  999. text-decoration: none;
  1000. }
  1001. .room-link:hover { color: var(--ci-blue); }
  1002. .room-link:hover .room-name { text-decoration: underline; }
  1003. /* Niveau badge */
  1004. .level-badge {
  1005. display: inline-block;
  1006. padding: 3px 10px;
  1007. border-radius: 20px;
  1008. font-size: 11.5px;
  1009. font-weight: 600;
  1010. background: var(--ci-blue-lt);
  1011. color: var(--ci-blue);
  1012. border: 1px solid rgba(29,78,216,.2);
  1013. }
  1014. /* Séquence active */
  1015. .seq-badge {
  1016. display: inline-flex;
  1017. align-items: center;
  1018. gap: 5px;
  1019. padding: 3px 10px;
  1020. border-radius: 20px;
  1021. font-size: 11px;
  1022. font-weight: 500;
  1023. background: var(--ci-teal-lt);
  1024. color: var(--ci-teal);
  1025. border: 1px solid rgba(13,148,136,.2);
  1026. }
  1027. .seq-dot {
  1028. width: 6px; height: 6px;
  1029. border-radius: 50%;
  1030. background: var(--ci-teal);
  1031. animation: pulse-dot 1.6s ease infinite;
  1032. }
  1033. @keyframes pulse-dot {
  1034. 0%,100% { opacity:1; } 50% { opacity:.35; }
  1035. }
  1036. /* Prof titulaire */
  1037. .main-teacher {
  1038. display: flex;
  1039. align-items: center;
  1040. gap: 7px;
  1041. font-size: 13px;
  1042. }
  1043. .teacher-avatar {
  1044. width: 26px; height: 26px;
  1045. border-radius: 50%;
  1046. background: linear-gradient(135deg, #1d4ed8, #0d9488);
  1047. color: #fff;
  1048. font-size: 10px;
  1049. font-weight: 700;
  1050. display: flex;
  1051. align-items: center;
  1052. justify-content: center;
  1053. flex-shrink: 0;
  1054. }
  1055. .no-teacher {
  1056. font-size: 12px;
  1057. color: var(--ci-rose);
  1058. font-style: italic;
  1059. }
  1060. /* Boutons action ligne */
  1061. .ci-actions {
  1062. display: flex;
  1063. align-items: center;
  1064. gap: 4px;
  1065. justify-content: flex-end;
  1066. }
  1067. .ci-btn {
  1068. display: inline-flex;
  1069. align-items: center;
  1070. gap: 5px;
  1071. padding: 5px 10px;
  1072. border-radius: 7px;
  1073. font-size: 11.5px;
  1074. font-weight: 500;
  1075. text-decoration: none;
  1076. border: 1px solid var(--ci-border);
  1077. cursor: pointer;
  1078. background: #fff;
  1079. color: var(--ci-dim);
  1080. transition: background .15s, border-color .15s, color .15s;
  1081. white-space: nowrap;
  1082. }
  1083. .ci-btn:hover { border-color: var(--ci-border-hi); color: var(--ci-ink); background: #f8f9fa; }
  1084. .ci-btn-primary { background: var(--ci-blue-lt); color: var(--ci-blue); border-color: rgba(29,78,216,.25); }
  1085. .ci-btn-primary:hover { background: #1d4ed8; color: #fff; }
  1086. .ci-btn-warning { background: var(--ci-amber-lt); color: var(--ci-amber); border-color: rgba(180,83,9,.25); }
  1087. .ci-btn-warning:hover { background: #b45309; color: #fff; }
  1088. .ci-btn-danger { background: var(--ci-rose-lt); color: var(--ci-rose); border-color: rgba(190,18,60,.25); }
  1089. .ci-btn-danger:hover { background: #be123c; color: #fff; }
  1090. /* ── Pagination ────────────────────────────────────────────── */
  1091. .ci-pagination {
  1092. display: flex;
  1093. align-items: center;
  1094. justify-content: space-between;
  1095. flex-wrap: wrap;
  1096. gap: 10px;
  1097. padding: 14px 20px;
  1098. border-top: 1px solid var(--ci-border);
  1099. background: #fafbfc;
  1100. }
  1101. .ci-pagination__info { font-size: 12.5px; color: var(--ci-muted); }
  1102. .ci-pager {
  1103. display: flex;
  1104. align-items: center;
  1105. gap: 4px;
  1106. list-style: none;
  1107. margin: 0; padding: 0;
  1108. }
  1109. .ci-pager li a,
  1110. .ci-pager li span {
  1111. display: inline-flex;
  1112. align-items: center;
  1113. justify-content: center;
  1114. min-width: 34px;
  1115. height: 34px;
  1116. padding: 0 8px;
  1117. border-radius: 8px;
  1118. border: 1px solid var(--ci-border);
  1119. font-size: 13px;
  1120. font-weight: 500;
  1121. color: var(--ci-dim);
  1122. text-decoration: none;
  1123. background: #fff;
  1124. transition: background .15s, border-color .15s, color .15s;
  1125. }
  1126. .ci-pager li a:hover { border-color: var(--ci-blue); color: var(--ci-blue); }
  1127. .ci-pager li.active span {
  1128. background: var(--ci-blue);
  1129. color: #fff;
  1130. border-color: var(--ci-blue);
  1131. font-weight: 700;
  1132. }
  1133. .ci-pager li.disabled span { opacity: .4; cursor: default; }
  1134. /* ── Vide ──────────────────────────────────────────────────── */
  1135. .ci-empty {
  1136. text-align: center;
  1137. padding: 64px 24px;
  1138. color: var(--ci-muted);
  1139. }
  1140. .ci-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
  1141. .ci-empty strong { display: block; font-size: 15px; color: var(--ci-dim); margin-bottom: 4px; }
  1142. /* ── Animation ─────────────────────────────────────────────── */
  1143. @keyframes fadeUp {
  1144. from { opacity:0; transform:translateY(10px); }
  1145. to { opacity:1; transform:none; }
  1146. }
  1147. .ci-table-card { animation: fadeUp .4s ease both; }
  1148. </style>
  1149. {% endblock %}
  1150. {% block content %}
  1151. <div class=\"ci-page\">
  1152. {# ── Barre de tête ──────────────────────────────────────────── #}
  1153. <div class=\"ci-topbar\">
  1154. <div>
  1155. <div class=\"ci-topbar__title\">
  1156. <i class=\"fa fa-th-large\"></i>
  1157. Classes
  1158. </div>
  1159. <div class=\"ci-topbar__sub\">
  1160. Gestion des classes — {% if year %}Année scolaire {{ year.code }}{% endif %}
  1161. {% if seq > 0 %} · Séquence active{% endif %}
  1162. </div>
  1163. </div>
  1164. {% if is_granted('ROLE_ADMIN') %}
  1165. <a href=\"{{ path('admin_classrooms_new') }}\" class=\"btn-add\">
  1166. <i class=\"fa fa-plus\"></i> Nouvelle classe
  1167. </a>
  1168. {% endif %}
  1169. </div>
  1170. {# ── KPIs globaux ───────────────────────────────────────────── #}
  1171. <div class=\"ci-stats\">
  1172. <div class=\"ci-stat\">
  1173. <div class=\"ci-stat__icon ic-blue\"><i class=\"fa fa-home\"></i></div>
  1174. <div>
  1175. <div class=\"ci-stat__val\">{{ classrooms|length }}</div>
  1176. <div class=\"ci-stat__lbl\">Classes</div>
  1177. </div>
  1178. </div>
  1179. <div class=\"ci-stat\">
  1180. <div class=\"ci-stat__icon ic-teal\"><i class=\"fa fa-graduation-cap\"></i></div>
  1181. <div>
  1182. <div class=\"ci-stat__val\">{{ students_count() }}</div>
  1183. <div class=\"ci-stat__lbl\">Élèves inscrits</div>
  1184. </div>
  1185. </div>
  1186. <div class=\"ci-stat\">
  1187. <div class=\"ci-stat__icon ic-amber\"><i class=\"fa fa-users\"></i></div>
  1188. <div>
  1189. <div class=\"ci-stat__val\">{{ teachers_count() }}</div>
  1190. <div class=\"ci-stat__lbl\">Enseignants</div>
  1191. </div>
  1192. </div>
  1193. <div class=\"ci-stat\">
  1194. <div class=\"ci-stat__icon ic-rose\"><i class=\"fa fa-book\"></i></div>
  1195. <div>
  1196. <div class=\"ci-stat__val\">{{ rooms_count() }}</div>
  1197. <div class=\"ci-stat__lbl\">Salles actives</div>
  1198. </div>
  1199. </div>
  1200. </div>
  1201. {# ── Tableau des classes ─────────────────────────────────────── #}
  1202. {% set items_per_page = 12 %}
  1203. {% set current_page = app.request.query.get('page', 1)|number_format %}
  1204. {% set total_pages = (classrooms|length / items_per_page)|round(0, 'ceil') %}
  1205. <div class=\"ci-table-card\">
  1206. <div class=\"ci-table-head\">
  1207. <div class=\"ci-table-head__title\">
  1208. <span class=\"ci-table-head__dot\"></span>
  1209. Liste des classes
  1210. <span style=\"font-size:11.5px;color:var(--ci-muted);font-weight:400;\">({{ classrooms|length }} au total)</span>
  1211. </div>
  1212. <div style=\"display:flex;gap:8px;align-items:center;\">
  1213. <span class=\"seq-badge\">
  1214. <span class=\"seq-dot\"></span>
  1215. {% if seq > 0 %}Séquence active{% else %}Aucune séquence active{% endif %}
  1216. </span>
  1217. </div>
  1218. </div>
  1219. {% if classrooms is empty %}
  1220. <div class=\"ci-empty\">
  1221. <i class=\"fa fa-inbox\"></i>
  1222. <strong>Aucune classe enregistrée</strong>
  1223. Commencez par créer une classe.
  1224. </div>
  1225. {% else %}
  1226. <div style=\"overflow-x:auto;\">
  1227. <table class=\"ci-tbl\">
  1228. <thead>
  1229. <tr>
  1230. <th style=\"width:4%\">#</th>
  1231. <th style=\"width:18%\">Classe</th>
  1232. <th style=\"width:12%\">Niveau</th>
  1233. <th style=\"width:22%\">Professeur titulaire</th>
  1234. <th style=\"width:10%\" class=\"text-center\">Modules</th>
  1235. <th style=\"width:10%\" class=\"text-center\">Matières</th>
  1236. <th style=\"width:24%\" class=\"text-right\">Actions</th>
  1237. </tr>
  1238. </thead>
  1239. <tbody>
  1240. {% for classroom in classrooms %}
  1241. {# ── Pagination côté Twig ── #}
  1242. {% if loop.index > (current_page - 1) * items_per_page and loop.index <= current_page * items_per_page %}
  1243. <tr>
  1244. <td style=\"color:var(--ci-muted);font-size:12px\">{{ (current_page - 1) * items_per_page + loop.index - ((current_page - 1) * items_per_page) }}</td>
  1245. <td>
  1246. <a href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" class=\"room-link\">
  1247. <span class=\"room-name\">{{ classroom.name }}</span>
  1248. </a>
  1249. </td>
  1250. <td>
  1251. <span class=\"level-badge\">{{ classroom.level }}</span>
  1252. </td>
  1253. <td>
  1254. {% if mainTeachers[classroom.id] is defined %}
  1255. <div class=\"main-teacher\">
  1256. <div class=\"teacher-avatar\">
  1257. {{ mainTeachers[classroom.id].fullName|slice(0,1)|upper }}{{ mainTeachers[classroom.id].fullName|split(' ')|last|slice(0,1)|upper }}
  1258. </div>
  1259. {{ mainTeachers[classroom.id].fullName }}
  1260. </div>
  1261. {% else %}
  1262. <span class=\"no-teacher\"><i class=\"fa fa-exclamation-triangle\"></i> Non assigné</span>
  1263. {% endif %}
  1264. </td>
  1265. <td class=\"text-center\">
  1266. <span style=\"font-weight:600;color:var(--ci-blue)\">{{ classroom.modules|length }}</span>
  1267. </td>
  1268. <td class=\"text-center\">
  1269. {% set total_courses = 0 %}
  1270. {% for module in classroom.modules %}
  1271. {% set total_courses = total_courses + module.courses|length %}
  1272. {% endfor %}
  1273. <span style=\"font-weight:600;color:var(--ci-teal)\">{{ total_courses }}</span>
  1274. </td>
  1275. <td>
  1276. <div class=\"ci-actions\">
  1277. <a class=\"ci-btn ci-btn-primary\" href=\"{{ path('admin_classrooms_show', {id: classroom.id}) }}\" title=\"Voir\">
  1278. <i class=\"fa fa-eye\"></i> Voir
  1279. </a>
  1280. {% if is_granted('ROLE_ADMIN') %}
  1281. <a class=\"ci-btn ci-btn-warning\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\" title=\"Modifier\">
  1282. <i class=\"fa fa-pencil\"></i>
  1283. </a>
  1284. {% if seq > 0 %}
  1285. <a class=\"ci-btn\" href=\"{{ path('admin_classrooms_recapitulatif', {room: classroom.id, seq: seq}) }}\" title=\"Récapitulatif PDF\">
  1286. <i class=\"fa fa-file-pdf-o\"></i>
  1287. </a>
  1288. {% endif %}
  1289. <form method=\"post\" action=\"{{ path('admin_classrooms_delete', {id: classroom.id}) }}\" onsubmit=\"return confirm('Supprimer cette classe ?')\" style=\"display:inline\">
  1290. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  1291. <button class=\"ci-btn ci-btn-danger\" type=\"submit\" title=\"Supprimer\">
  1292. <i class=\"fa fa-trash\"></i>
  1293. </button>
  1294. </form>
  1295. {% endif %}
  1296. </div>
  1297. </td>
  1298. </tr>
  1299. {% endif %}
  1300. {% endfor %}
  1301. </tbody>
  1302. </table>
  1303. </div>
  1304. {# ── Pagination ────────────────────────────────────────────── #}
  1305. {% if total_pages > 1 %}
  1306. <div class=\"ci-pagination\">
  1307. <div class=\"ci-pagination__info\">
  1308. Page {{ current_page }} sur {{ total_pages }} — {{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }}
  1309. </div>
  1310. <ul class=\"ci-pager\">
  1311. <li class=\"{{ current_page <= 1 ? 'disabled' : '' }}\">
  1312. {% if current_page > 1 %}
  1313. <a href=\"?page={{ current_page - 1 }}\"><i class=\"fa fa-chevron-left\"></i></a>
  1314. {% else %}
  1315. <span><i class=\"fa fa-chevron-left\"></i></span>
  1316. {% endif %}
  1317. </li>
  1318. {% for p in 1..total_pages %}
  1319. {% if p == current_page %}
  1320. <li class=\"active\"><span>{{ p }}</span></li>
  1321. {% elseif p == 1 or p == total_pages or (p >= current_page - 2 and p <= current_page + 2) %}
  1322. <li><a href=\"?page={{ p }}\">{{ p }}</a></li>
  1323. {% elseif p == current_page - 3 or p == current_page + 3 %}
  1324. <li><span style=\"border:none;background:transparent\">…</span></li>
  1325. {% endif %}
  1326. {% endfor %}
  1327. <li class=\"{{ current_page >= total_pages ? 'disabled' : '' }}\">
  1328. {% if current_page < total_pages %}
  1329. <a href=\"?page={{ current_page + 1 }}\"><i class=\"fa fa-chevron-right\"></i></a>
  1330. {% else %}
  1331. <span><i class=\"fa fa-chevron-right\"></i></span>
  1332. {% endif %}
  1333. </li>
  1334. </ul>
  1335. </div>
  1336. {% else %}
  1337. <div class=\"ci-pagination\">
  1338. <div class=\"ci-pagination__info\">{{ classrooms|length }} classe{{ classrooms|length > 1 ? 's' : '' }} au total</div>
  1339. </div>
  1340. {% endif %}
  1341. {% endif %}
  1342. </div>
  1343. </div>
  1344. {% endblock %}
  1345. ", "classroom/index.html.twig", "/var/www/bethesda/templates/classroom/index.html.twig");
  1346. }
  1347. }