var/cache/dev/twig/6a/6aa1424f8fabde7c393cc73eac20ee5f.php line 53

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. /* course/show.html.twig */
  16. class __TwigTemplate_aedba20b4a3c84a2349c89120b39f2ca 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. 'content' => [$this, 'block_content'],
  29. ];
  30. }
  31. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  32. {
  33. // line 1
  34. return "layout/backEndLayout.html.twig";
  35. }
  36. protected function doDisplay(array $context, array $blocks = []): iterable
  37. {
  38. $macros = $this->macros;
  39. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "course/show.html.twig"));
  41. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "course/show.html.twig"));
  43. $this->parent = $this->loadTemplate("layout/backEndLayout.html.twig", "course/show.html.twig", 1);
  44. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47. }
  48. // line 3
  49. /**
  50. * @return iterable<null|scalar|\Stringable>
  51. */
  52. public function block_content(array $context, array $blocks = []): iterable
  53. {
  54. $macros = $this->macros;
  55. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  57. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  59. // line 4
  60. yield "
  61. <div class=\"row\">
  62. <div class=\"col-lg-2\" >
  63. <div class=\"btn-group record_actions m-2\">
  64. ";
  65. // line 10
  66. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  67. // line 11
  68. yield "
  69. <a class=\"btn btn-info\" href=\"";
  70. // line 12
  71. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses");
  72. yield "\">
  73. <i class=\"fa fa-list\"></i> ";
  74. // line 13
  75. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back to the list", [], "admin"), "html", null, true);
  76. yield "
  77. </a>
  78. ";
  79. }
  80. // line 16
  81. yield " </div>
  82. </div>
  83. <div class=\"col-lg-10 jumbotron\">
  84. <article class=\"p-3\" >
  85. <div class=\"container\">
  86. <div class=\"card-deck mb-3 text-center\">
  87. <div class=\"card mb-4 box-shadow\">
  88. <div class=\"card-header\">
  89. <h4 class=\"my-0 font-weight-normal\">";
  90. // line 24
  91. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 24, $this->source); })()), "wording", [], "any", false, false, false, 24), "html", null, true);
  92. yield "</h4>
  93. </div>
  94. <div class=\"card-body\">
  95. <div>
  96. <ul class=\"list-unstyled h3 mt-3 mb-4\">
  97. <li>";
  98. // line 29
  99. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 29, $this->source); })()), "coefficient", [], "any", false, false, false, 29), "html", null, true);
  100. yield "</li>
  101. <li>";
  102. // line 30
  103. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 30, $this->source); })()), "code", [], "any", false, false, false, 30), "html", null, true);
  104. yield "</li>
  105. <li>";
  106. // line 31
  107. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 31, $this->source); })()), "module", [], "any", false, false, false, 31), "name", [], "any", false, false, false, 31), "html", null, true);
  108. yield "</li>
  109. <li>";
  110. // line 32
  111. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 32, $this->source); })()), "domain", [], "any", false, false, false, 32), "name", [], "any", false, false, false, 32), "html", null, true);
  112. yield "</li>
  113. </ul>
  114. <div class=\" \">\t\t\t
  115. ";
  116. // line 37
  117. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  118. // line 38
  119. yield " <a class=\"btn btn-outline-warning\" href=\"";
  120. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 38, $this->source); })()), "id", [], "any", false, false, false, 38)]), "html", null, true);
  121. yield "\"> <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>Edit </a> |
  122. <a class=\"btn btn-outline-danger\" href=\"#\" onclick= \"event.preventDefault() ; confirm('Are you sure ?') && document.getElementById('js-course-delete-form').submit();\"> <i class=\"fa fa-trash\"></i> Delete</a>
  123. <form id=\"js-course-delete-form\" action=\"";
  124. // line 40
  125. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses_delete", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 40, $this->source); })()), "id", [], "any", false, false, false, 40)]), "html", null, true);
  126. yield "\" method=\"post\" style=\"display: none;\">
  127. <input type=\"hidden\" name=\"csrf_token\" value=\"";
  128. // line 41
  129. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken(("courses_deletion" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 41, $this->source); })()), "id", [], "any", false, false, false, 41))), "html", null, true);
  130. yield "\" id=\"\">
  131. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  132. </form>
  133. ";
  134. }
  135. // line 46
  136. yield " </div>
  137. </div>
  138. <div>
  139. <h5 class=\"card-title list-unstyled h3 mt-3 mb-4\">Historique des attributions</h5>
  140. <table class=\"table table-striped\">
  141. <thead>
  142. <tr>
  143. <th scope=\"col\">Annee scolaire</th>
  144. <th scope=\"col\">Enseignant</th>
  145. <th scope=\"col\">Titulaire</th>
  146. </tr>
  147. </thead>
  148. <tbody>
  149. ";
  150. // line 60
  151. $context['_parent'] = $context;
  152. $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::reverse($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["course"]) || array_key_exists("course", $context) ? $context["course"] : (function () { throw new RuntimeError('Variable "course" does not exist.', 60, $this->source); })()), "attributions", [], "any", false, false, false, 60)));
  153. foreach ($context['_seq'] as $context["_key"] => $context["attribution"]) {
  154. // line 61
  155. yield " <tr>
  156. <td>";
  157. // line 62
  158. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribution"], "schoolYear", [], "any", false, false, false, 62), "html", null, true);
  159. yield "</td>
  160. <td>";
  161. // line 63
  162. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribution"], "teacher", [], "any", false, false, false, 63), "html", null, true);
  163. yield "</td>
  164. <td>";
  165. // line 64
  166. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribution"], "headTeacher", [], "any", false, false, false, 64), "html", null, true);
  167. yield "</td>
  168. </tr>
  169. ";
  170. }
  171. $_parent = $context['_parent'];
  172. unset($context['_seq'], $context['_key'], $context['attribution'], $context['_parent']);
  173. $context = array_intersect_key($context, $_parent) + $_parent;
  174. // line 67
  175. yield "
  176. </tbody>
  177. </table>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </article>
  183. </div>
  184. </div>
  185. ";
  186. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  188. yield from [];
  189. }
  190. /**
  191. * @codeCoverageIgnore
  192. */
  193. public function getTemplateName(): string
  194. {
  195. return "course/show.html.twig";
  196. }
  197. /**
  198. * @codeCoverageIgnore
  199. */
  200. public function isTraitable(): bool
  201. {
  202. return false;
  203. }
  204. /**
  205. * @codeCoverageIgnore
  206. */
  207. public function getDebugInfo(): array
  208. {
  209. return array ( 197 => 67, 188 => 64, 184 => 63, 180 => 62, 177 => 61, 173 => 60, 157 => 46, 149 => 41, 145 => 40, 139 => 38, 137 => 37, 129 => 32, 125 => 31, 121 => 30, 117 => 29, 109 => 24, 99 => 16, 93 => 13, 89 => 12, 86 => 11, 84 => 10, 76 => 4, 63 => 3, 40 => 1,);
  210. }
  211. public function getSourceContext(): Source
  212. {
  213. return new Source("{% extends 'layout/backEndLayout.html.twig' %}
  214. {% block content %}
  215. <div class=\"row\">
  216. <div class=\"col-lg-2\" >
  217. <div class=\"btn-group record_actions m-2\">
  218. {% if is_granted('ROLE_ADMIN') %}
  219. <a class=\"btn btn-info\" href=\"{{ path('admin_courses') }}\">
  220. <i class=\"fa fa-list\"></i> {{ 'Back to the list'|trans({}, 'admin') }}
  221. </a>
  222. {% endif %}
  223. </div>
  224. </div>
  225. <div class=\"col-lg-10 jumbotron\">
  226. <article class=\"p-3\" >
  227. <div class=\"container\">
  228. <div class=\"card-deck mb-3 text-center\">
  229. <div class=\"card mb-4 box-shadow\">
  230. <div class=\"card-header\">
  231. <h4 class=\"my-0 font-weight-normal\">{{course.wording}}</h4>
  232. </div>
  233. <div class=\"card-body\">
  234. <div>
  235. <ul class=\"list-unstyled h3 mt-3 mb-4\">
  236. <li>{{course.coefficient}}</li>
  237. <li>{{course.code}}</li>
  238. <li>{{course.module.name}}</li>
  239. <li>{{course.domain.name}}</li>
  240. </ul>
  241. <div class=\" \">\t\t\t
  242. {% if is_granted('ROLE_ADMIN') %}
  243. <a class=\"btn btn-outline-warning\" href=\"{{path('admin_courses_edit', {id: course.id})}}\"> <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>Edit </a> |
  244. <a class=\"btn btn-outline-danger\" href=\"#\" onclick= \"event.preventDefault() ; confirm('Are you sure ?') && document.getElementById('js-course-delete-form').submit();\"> <i class=\"fa fa-trash\"></i> Delete</a>
  245. <form id=\"js-course-delete-form\" action=\"{{path('admin_courses_delete', {id: course.id})}}\" method=\"post\" style=\"display: none;\">
  246. <input type=\"hidden\" name=\"csrf_token\" value=\"{{ csrf_token('courses_deletion' ~ course.id ) }}\" id=\"\">
  247. <input type=\"hidden\" name=\"_method\" value=\"DELETE\">
  248. </form>
  249. {% endif %}
  250. </div>
  251. </div>
  252. <div>
  253. <h5 class=\"card-title list-unstyled h3 mt-3 mb-4\">Historique des attributions</h5>
  254. <table class=\"table table-striped\">
  255. <thead>
  256. <tr>
  257. <th scope=\"col\">Annee scolaire</th>
  258. <th scope=\"col\">Enseignant</th>
  259. <th scope=\"col\">Titulaire</th>
  260. </tr>
  261. </thead>
  262. <tbody>
  263. {% for attribution in course.attributions|reverse %}
  264. <tr>
  265. <td>{{attribution.schoolYear}}</td>
  266. <td>{{attribution.teacher}}</td>
  267. <td>{{attribution.headTeacher}}</td>
  268. </tr>
  269. {% endfor %}
  270. </tbody>
  271. </table>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. </article>
  277. </div>
  278. </div>
  279. {% endblock %}
  280. ", "course/show.html.twig", "/var/www/prod/liveedu/templates/course/show.html.twig");
  281. }
  282. }