{% extends 'other_admin/custom_admin_base.html' %}
{% load static %}
{% block m-title %}{{enseignant}}{% endblock m-title %}
{% block content %}
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box) -->
        <div class="container">
            <div class="card">
                <div class="card-header text-white" style="background: #21618C"><h3 class="card-title">LISTE DES ETABLISSEMENTS</h3>
                    <button style="float:right;margin:2px;" class="btn btn-default btn-sm" data-toggle="modal" data-target="#addufr" ><i class="fa fa-plus"></i> Ajouter un établissement</button>
                    {% include 'other_admin/enseignant/modal_add_ufr.html' %}
                </div>
                <div class="card-body">
                    <table class="table table-striped">
                        <thead>
                            <th>ANNEE</th>
                            <th>CODE</th>
                            <th>LIBELLE</th>
                            <th></th>
                        </thead>
                        <tbody>
                        {% for item in ufrs %}
                            <tr>
                                <td width="100" style="font-weight:bold;">{{ item.annee }}</td>
                                <td width="100" style="font-weight:bold;">{{ item.ufr.code }}</td>
                                <td>{{ item.ufr.libelle }}</td>
                                <td width="170">
                                    <button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#delufr{{item.id}}"><i class="fa fa-trash" title="supprimer"></i> Retirer</button>
                                    {% include 'other_admin/enseignant/modal_delete_ufr.html' %}
                                </td>
                            </tr>
                        {% empty %}
                            <tr>
                                <td colspan="4" style="text-align:center;"> Aucun résultat</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                    <div class="blog">
                        {% include 'other_admin/pagination.html' %}
                    </div>
                </div>
            </div>

      </div>
    </div>
</section>

{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}