{% extends 'dg_ufr/base_ufr.html' %}
{% load static %}
{% load custom_tag %}
{% load custom_tag_obj %}
{% block content %}
<div class="card mb-3">
    <div class="card-header">
        <i class="fas fa-table"></i>
        GROUPE
        <button data-toggle="modal" data-target="#addGroup" style="float:right;margin:2px;" class="btn btn-primary btn-sm" ><i class="fa fa-plus"></i> Ajouter</button>
        {% include 'dg_ufr/modal/modal_add_groupe.html' %}
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-bordered table-striped" id="dataTable" width="100%" cellspacing="0">
                <thead>
                <tr>
                    <th></th>
                    <th>LIBELLE</th>
                    <th>TYPE</th>
                    <th>NIVEAU</th>
                    <th>ANNEE</th>
                    <th></th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th></th>
                    <th>LIBELLE</th>
                    <th>TYPE</th>
                    <th>NIVEAU</th>
                    <th>ANNEE</th>
                    <th></th>
                </tr>
                </tfoot>
                <tbody>
                {% for item in groupes %}
                    <tr>
                        <td>{{ forloop.counter }}</td>
                        <td>{{ item.libelle }}</td>
                        <td>{{ item.type_cours }}</td>
                        <td>{{ item.niveau.libelle }}</td>
                        <td>{{ item.annee }}</td>
                        <td width="280">
                            <a type="button" class="btn btn-warning btn-sm " href="{% url 'EspaceEnseignant:groupe_etudiant_list' item.id %}" ><i class="fa fa-user-plus" title="modifier"></i> Etudiant</a>
                            <a type="button" class="btn btn-warning btn-sm " href="{% url 'EspaceEnseignant:groupe_enseignant_list' item.id %}" ><i class="fa fa-user-plus" title="modifier"></i> Enseignant</a>
                            <a type="button" class="btn btn-primary btn-sm " href="{% url 'EspaceEnseignant:groupe_etude_edit' item.id %}" ><i class="fa fa-edit" title="modifier"></i></a>
                           <!-- <a type="button" class="btn btn-danger btn-sm" href="#"><i class="fa fa-trash" title="supprimer"></i></a> -->
                            <button data-toggle="modal" data-target="#deletegroup{{item.id}}" type="button" class="btn btn-danger btn-sm " ><i class="fa fa-trash" title="Supprimer"></i> </button>
                            {% include 'dg_ufr/modal/modal_delete_groupe.html' %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>

{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}