{% extends 'dg_ufr/base_ufr.html' %}
{% load static %}
{% block m-title %}LISTE DE RECLAMATIONS{% endblock m-title %}
{% load widget_tweaks %}
{% block custom_css %}
body{
    color:red;
}
{% endblock custom_css %}
{% block content %}
<div class="card mb-3">
    <div class="card-header">
        <i class="fas fa-table"></i>
        RECLAMATIONS
    </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 style="width:40px;"></th>
                    <th style="width:190px;">DATE</th>
                    <th>MOTIF</th>
                    <th>APPRENANT</th>
                    <th>STATUS</th>
                    <th>ACTIONS</th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <th style="width:40px;"></th>
                    <th style="width:190px;">DATE</th>
                    <th>MOTIF</th>
                    <th>APPRENANT</th>
                    <th>STATUS</th>
                    <th>ACTIONS</th>
                </tr>
                </tfoot>
                <tbody>
                {% for reclamation in reclamations %}
                    <tr style="{% if reclamation.reception == False %}font-weight:bold;{% endif %}font-size:14px;">
                        <td><i class="fa {% if reclamation.reception == True %} fa-envelope{% else %} fa-envelope{% endif %}"></i></td>
                        <td>{{reclamation.created|date:'d-m-Y à H:i'}}</td>
                        <td>{{reclamation.motif}}</td>
                        <td>{{reclamation.etudiant.nce}}</td>
                        <td>
                            <span class="badge
                            {% if reclamation.status == 'Recevable' %}
                            badge-success
                            {% elif reclamation.status == 'Non-recevable' %}
                            badge-warning
                            {% else %}
                            badge-secondary
                            {% endif%}
                            ">{{reclamation.status}}</span>
                        </td>
                        <td style="float:right;">
                            <a class="btn btn-primary" href="{% url 'EspaceEnseignant:dr_reclamation_detail' reclamation.id %}"><i class="fa fa-eye"></i> </a>
                            <button class="btn btn-danger" data-toggle="modal" data-target="#rec{{reclamation.id}}"><i class="fa fa-trash"></i></button>
                            {% include 'dg_ufr/modal_archive.html' %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}