templates/course/show.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/backEndLayout.html.twig' %}
  2. {% block content %}
  3.    
  4.        
  5.             <div class="row">
  6.                     <div class="col-lg-2" >
  7.                         <div class="btn-group record_actions  m-2">
  8.                             {% if is_granted('ROLE_ADMIN') %}
  9.                             <a class="btn btn-info" href="{{ path('admin_courses') }}">
  10.                                 <i class="fa fa-list"></i> {{ 'Back to the list'|trans({}, 'admin') }}
  11.                             </a>
  12.                             {% endif %}
  13.                         </div>
  14.                     </div>
  15.                     <div class="col-lg-10 jumbotron">
  16.                     <article  class="p-3" >
  17.                             <div class="container">
  18.                             <div class="card-deck mb-3 text-center">
  19.                                 <div class="card mb-4 box-shadow">
  20.                                     <div class="card-header">
  21.                                         <h4 class="my-0 font-weight-normal">{{course.wording}}</h4>
  22.                                     </div>
  23.                                 <div class="card-body">
  24.                                     <div>
  25.                                         <ul class="list-unstyled h3 mt-3 mb-4">
  26.                                             <li>{{course.coefficient}}</li>
  27.                                             <li>{{course.code}}</li>
  28.                                             <li>{{course.module.name}}</li>
  29.                                             <li>{{course.domain.name}}</li>
  30.                                     
  31.                                         </ul>
  32.                                         <div class=" ">            
  33.                                         {% if is_granted('ROLE_ADMIN') %}
  34.                                             <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> |
  35.                                             <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>
  36.                                             <form id="js-course-delete-form" action="{{path('admin_courses_delete', {id: course.id})}}" method="post" style="display: none;">
  37.                                                 <input type="hidden" name="csrf_token" value="{{ csrf_token('courses_deletion' ~ course.id ) }}" id="">
  38.                                                 <input type="hidden" name="_method" value="DELETE">
  39.                                             </form>
  40.                                         {% endif %}
  41.                                         </div>
  42.                                      </div>
  43.                                      <div>
  44.                                          <h5 class="card-title list-unstyled h3 mt-3 mb-4">Historique des attributions</h5>
  45.                                          <table class="table table-striped">
  46.                                             <thead>
  47.                                                 <tr>
  48.                                                
  49.                                                     <th scope="col">Annee scolaire</th>
  50.                                                     <th scope="col">Enseignant</th>
  51.                                                     <th scope="col">Titulaire</th>
  52.                                                 </tr>
  53.                                             </thead>
  54.                                             <tbody>
  55.                                                 {% for attribution in course.attributions|reverse %}
  56.                                                     <tr>
  57.                                                         <td>{{attribution.schoolYear}}</td>
  58.                                                         <td>{{attribution.teacher}}</td>
  59.                                                         <td>{{attribution.headTeacher}}</td>
  60.                                                     </tr>
  61.                                                 {% endfor %}
  62.                                                
  63.                                             </tbody>
  64.                                         </table>
  65.                                      </div>
  66.                                 </div>
  67.                             </div>
  68.                              </div>
  69.                      </article>
  70.                     </div>      
  71.             </div>
  72. {% endblock %}