templates/course/show.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/backEndLayout.html.twig' %}
  2. {% block title %}Détail du Cours - {{ parent() }}{% endblock %}
  3. {% block content %}
  4. <div class="container mt-5">
  5. <div class="row mb-3">
  6. <div class="col-lg-2">
  7. {% if is_granted('ROLE_ADMIN') %}
  8. <a href="{{ path('admin_courses') }}" class="btn btn-info w-100">
  9. <i class="fa fa-list"></i> Retour à la liste
  10. </a>
  11. {% endif %}
  12. </div>
  13. <div class="col-lg-10">
  14. <div class="card shadow-lg border-0 rounded-4">
  15. <div class="card-header bg-primary text-white text-center rounded-top-4">
  16. <h4 class="mb-0">{{ course.wording }}</h4>
  17. </div>
  18. <div class="card-body p-4">
  19. <ul class="list-unstyled h5 mb-4 row">
  20. <li class="col-md-3"><strong>Coefficient:</strong> {{ course.coefficient }}</li>
  21. <li class="col-md-3"><strong>Code:</strong> {{ course.code }}</li>
  22. <li class="col-md-3"><strong>Module:</strong> {{ course.module.name }}</li>
  23. <li class="col-md-3"><strong>Domaine:</strong> {{ course.domain.name }}</li>
  24. </ul>
  25. {% if is_granted('ROLE_ADMIN') %}
  26. <div class="mb-4 text-center">
  27. <a href="{{ path('admin_courses_edit', {id: course.id}) }}" class="btn btn-warning me-2">
  28. <i class="fa fa-pencil"></i> Modifier le cours
  29. </a>
  30. <a href="#" class="btn btn-danger"
  31. onclick="event.preventDefault(); if(confirm('Êtes-vous sûr de vouloir supprimer ce cours ?')) document.getElementById('delete-course-form').submit();">
  32. <i class="fa fa-trash"></i> Supprimer le cours
  33. </a>
  34. <form id="delete-course-form" method="post" action="{{ path('admin_courses_delete', {id: course.id}) }}" style="display:none;">
  35. <input type="hidden" name="_method" value="DELETE" />
  36. <input type="hidden" name="csrf_token" value="{{ csrf_token('courses_deletion' ~ course.id) }}" />
  37. </form>
  38. </div>
  39. {% endif %}
  40. <h5 class="mb-3 border-bottom pb-2">Historique des attributions</h5>
  41. <div class="table-responsive">
  42. <table class="table table-striped table-hover text-center align-middle">
  43. <thead class="table-primary">
  44. <tr>
  45. <th scope="col">Année scolaire</th>
  46. <th scope="col">Enseignant</th>
  47. <th scope="col">Titulaire</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. {% for attribution in course.attributions|reverse %}
  52. <tr>
  53. <td>{{ attribution.schoolYear }}</td>
  54. <td>{{ attribution.teacher }}</td>
  55. <td>{{ attribution.headTeacher }}</td>
  56. </tr>
  57. {% else %}
  58. <tr>
  59. <td colspan="3" class="text-center">Aucune attribution trouvée.</td>
  60. </tr>
  61. {% endfor %}
  62. </tbody>
  63. </table>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. {% endblock %}