{% 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="#addInfo" 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_info.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>ETABLISSEMENT</th>
                    <th>CIBLE</th>
                    <th>TITRE</th>
                    <th>PUBLIEE?</th>
                    <th></th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th></th>
                    <th>ETABLISSEMENT</th>
                    <th>CIBLE</th>
                    <th>TITRE</th>
                    <th>PUBLIEE?</th>
                    <th></th>
                </tr>
                </tfoot>
                <tbody>
                {% for item in infos %}
                    <tr>
                        <td>{{ forloop.counter }}</td>
                        <td>{{ item.ufr }}</td>
                        <td>{{ item.cible }}</td>
                        <td>{{ item.titre }}</td>
                        <td width="50">
                            {% if item.published %}
                            <span class="badge badge-success"> OUI</span>
                            {% else %}
                            <span class="badge badge-secondary"> NON</span>
                            {% endif %}
                        </td>
                        <td width="80">
                            <a type="button" class="btn btn-primary btn-sm" href="{% url 'EspaceEnseignant:flash_info_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_info.html' %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>

{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}