{% extends 'president/pr_base.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> | NIVEAU: <span style="color:red">{{niveau}}</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" hidden>
                            <select class="form-control" name="annee">
                                {% for an in annees %}
                                <option value="{{an.id}}">{{an}}</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-md-2">
                            <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 ETUDIANTS</h3></div>
                <div class="card-body">
                    <table class="table table-striped table-bordered" style="text-transform:uppercase;">
                            <tr>
                              <th></th>
                              <th>NCE</th>
                              <th>NOM & PRENOMS</th>
                              <th>SEXE</th>
                              <th>NAISSANCE</th>
                              <th>LIEU</th>
                              <th></th>
                            </tr>
                          {% for etudiant in etudiant_list %}
                            <tr>
                                <td>{{forloop.counter}}</td>
                                <td><b>{{etudiant.nce}}</b></td>
                                <td>{{etudiant}}</td>
                                <td>{{etudiant.sexe}}</td>
                                <td>{{etudiant.datenaiss|date:'d/m/Y'}}</td>
                                <td>{{etudiant.lieunaiss}}</td>
                                <td>
                                    <a class="btn btn-primary text-white" href="{% url 'EspaceEnseignant:vpr_etudiant_ue' etudiant.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 %}