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