{% extends 'vice_president/base_vpr.html' %}
{% load static %}
{% load custom_tag %}
{% block content %}
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box)-->
        <div class="container">

            <div style="text-align:center;">
                <h2>UFR: <span style="color:red">{{UFR.code}}</span> | ANNEE: <span style="color:red">{{anUniv}}</span> </h2>
            </div>
            <div class="card">
                <div class="card-header text-white" style="background: #21618C">
                    MENU
                </div>
                <div class="card-body">
                    <form method="post" action="#">
                        {% csrf_token %}
                    <div class="row">
                        <div class="col-md-2">
                            <select class="form-control" name="annee">
                                {% for an in annees %}
                                <option value="{{an.id}}">{{an}}</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-md-2" hidden>
                            <select class="form-control" name="niveau">
                                {% for niv in niveaux %}
                                <option value="{{niv.id}}">{{niv}}</option>
                                {% endfor %}
                            </select>
                            <input type="text" value="1" name="semestre" hidden>
                        </div>
                        <div class="col-md-2">
                            <button type="submit" name="AnneeFilter" class='btn btn-primary'><i class="fa fa-filter"></i></button>
                        </div>
                    </div>
                    </form>
                </div>
            </div>

            <div class="card">
                <div class="card-header text-white" style="background: #21618C"><h3 class="card-title">LISTE DES ENSEIGNANTS</h3></div>
                <div class="card-body">
                    <table class="table table-striped table-bordered" style="text-transform:uppercase;">
                            <tr>
                              <th></th>
                              <th>NOM & PRENOMS</th>
                              <th>GRADE</th>
                              <th>SPECIALITE</th>
                              <th>STATUT</th>
                              <th></th>
                            </tr>
                          {% for enseignant in enseignants %}
                            <tr>
                                <td>{{forloop.counter}}</td>
                                <td>{{enseignant}}</td>
                                <td>{{enseignant.grade}}</td>
                                <td>{{enseignant.specialite}}</td>
                                <td>{% if enseignant.statut %}{{enseignant.statut}}{% else %}--{% endif %}</td>
                                <td>
                                    <a class="btn btn-primary text-white" href="{% url 'EspaceEnseignant:dr_ecue_infos' enseignant.id %}"><i class="fa fa-eye"></i> </a>
                                </td>
                            </tr>
                            {% include 'EspaceEnseignant/modal_deliberation.html' %}
                          {% empty %}
                            <tr>
                                <td colspan="7"><center>AUCUN RESULTAT</center></td>
                            </tr>
                          {% endfor %}


                    </table><br/>
                </div>
            </div>
        </div>


    </div>
  </section>
{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}