<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* course/show.html.twig */
class __TwigTemplate_6a1bac38e424f1d4fdb2ab924dfbc1a0 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout/backEndLayout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "course/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "course/show.html.twig"));
$this->parent = $this->loadTemplate("layout/backEndLayout.html.twig", "course/show.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
yield "
<div class=\"row\">
<div class=\"col-lg-2\" >
<div class=\"btn-group record_actions m-2\">
";
// line 10
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 11
yield "
<a class=\"btn btn-info\" href=\"";
// line 12
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses");
yield "\">
<i class=\"fa fa-list\"></i> ";
// line 13
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back to the list", [], "admin"), "html", null, true);
yield "
</a>
";
}
// line 16
yield " </div>
</div>
<div class=\"col-lg-10 jumbotron\">
<article class=\"p-3\" >
<div class=\"container\">
<div class=\"card-deck mb-3 text-center\">
<div class=\"card mb-4 box-shadow\">
<div class=\"card-header\">
<h4 class=\"my-0 font-weight-normal\">";
// line 24
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);
yield "</h4>
</div>
<div class=\"card-body\">
<div>
<ul class=\"list-unstyled h3 mt-3 mb-4\">
<li>";
// line 29
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);
yield "</li>
<li>";
// line 30
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);
yield "</li>
<li>";
// line 31
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);
yield "</li>
<li>";
// line 32
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);
yield "</li>
</ul>
<div class=\" \">\t\t\t
";
// line 37
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 38
yield " <a class=\"btn btn-outline-warning\" href=\"";
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);
yield "\"> <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>Edit </a> |
<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>
<form id=\"js-course-delete-form\" action=\"";
// line 40
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);
yield "\" method=\"post\" style=\"display: none;\">
<input type=\"hidden\" name=\"csrf_token\" value=\"";
// line 41
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);
yield "\" id=\"\">
<input type=\"hidden\" name=\"_method\" value=\"DELETE\">
</form>
";
}
// line 46
yield " </div>
</div>
<div>
<h5 class=\"card-title list-unstyled h3 mt-3 mb-4\">Historique des attributions</h5>
<table class=\"table table-striped\">
<thead>
<tr>
<th scope=\"col\">Annee scolaire</th>
<th scope=\"col\">Enseignant</th>
<th scope=\"col\">Titulaire</th>
</tr>
</thead>
<tbody>
";
// line 60
$context['_parent'] = $context;
$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)));
foreach ($context['_seq'] as $context["_key"] => $context["attribution"]) {
// line 61
yield " <tr>
<td>";
// line 62
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);
yield "</td>
<td>";
// line 63
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);
yield "</td>
<td>";
// line 64
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);
yield "</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['attribution'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
yield "
</tbody>
</table>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "course/show.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'layout/backEndLayout.html.twig' %}
{% block content %}
<div class=\"row\">
<div class=\"col-lg-2\" >
<div class=\"btn-group record_actions m-2\">
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-info\" href=\"{{ path('admin_courses') }}\">
<i class=\"fa fa-list\"></i> {{ 'Back to the list'|trans({}, 'admin') }}
</a>
{% endif %}
</div>
</div>
<div class=\"col-lg-10 jumbotron\">
<article class=\"p-3\" >
<div class=\"container\">
<div class=\"card-deck mb-3 text-center\">
<div class=\"card mb-4 box-shadow\">
<div class=\"card-header\">
<h4 class=\"my-0 font-weight-normal\">{{course.wording}}</h4>
</div>
<div class=\"card-body\">
<div>
<ul class=\"list-unstyled h3 mt-3 mb-4\">
<li>{{course.coefficient}}</li>
<li>{{course.code}}</li>
<li>{{course.module.name}}</li>
<li>{{course.domain.name}}</li>
</ul>
<div class=\" \">\t\t\t
{% if is_granted('ROLE_ADMIN') %}
<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> |
<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>
<form id=\"js-course-delete-form\" action=\"{{path('admin_courses_delete', {id: course.id})}}\" method=\"post\" style=\"display: none;\">
<input type=\"hidden\" name=\"csrf_token\" value=\"{{ csrf_token('courses_deletion' ~ course.id ) }}\" id=\"\">
<input type=\"hidden\" name=\"_method\" value=\"DELETE\">
</form>
{% endif %}
</div>
</div>
<div>
<h5 class=\"card-title list-unstyled h3 mt-3 mb-4\">Historique des attributions</h5>
<table class=\"table table-striped\">
<thead>
<tr>
<th scope=\"col\">Annee scolaire</th>
<th scope=\"col\">Enseignant</th>
<th scope=\"col\">Titulaire</th>
</tr>
</thead>
<tbody>
{% for attribution in course.attributions|reverse %}
<tr>
<td>{{attribution.schoolYear}}</td>
<td>{{attribution.teacher}}</td>
<td>{{attribution.headTeacher}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
{% endblock %}
", "course/show.html.twig", "/var/www/prod/current/templates/course/show.html.twig");
}
}