{% extends 'enseignant/base_profile.html' %}
{% load static %}
{% load custom_tag %}
{% load custom_tag_obj %}
{% block m-title %}Emploi du Temps du<span style="color:red;"> {{validite.dateDebut|date:'d-m-Y'}}</span> au <span style="color:red;"> {{validite.dateFin|date:'d-m-Y'}}</span>{% endblock m-title %}
{% load widget_tweaks %}
{% 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"></h3>
                </div>
                <div class="card-body">
                    <form method="post" action="#">
                        {% csrf_token %}
                    <div class="row">
                        <div class="col-md-4">
                            <select name="periode" class="form-control">
                                <option value="aucun">------- Periode -----</option>
                                {% for periode in validites %}
                                <option value="{{ periode.id }}">{{ periode.dateDebut|date:'d-m-Y' }} au {{ periode.dateFin|date:'d-m-Y' }}</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-md-2">
                            <button type="submit" name="FilterBtn" class='btn btn-primary'><i class="fa fa-search"></i>&nbsp; Filtrer</button>
                        </div>
                    </div>
                    </form>
                    <hr/>
                    <div class="row">
                        <div class="col-md-2">
                            <span style="border:1px solid #000000;padding:5px 15px 5px 15px;background-color:#FF00FF;"></span>&nbsp; CVM
                        </div><div class="col-md-2">
                            <span style="border:1px solid #000000;padding:5px 15px 5px 15px;background-color:#00BFFF;"></span>&nbsp; CVT
                        </div><div class="col-md-2">
                        <!--
                            <span style="border:1px solid #000000;padding:5px 15px 5px 15px;background-color:#20B2AA;"></span>&nbsp; ARHAI
                        </div><div class="col-md-2">
                            <span style="border:1px solid #000000;padding:5px 15px 5px 15px;background-color:#FFC300;"></span>&nbsp; TES
                        -->
                        </div>
                    </div>

                </div>
            </div>

            {% for niveau in niveaux %}<!-- #21618C -->
            <div class="card">
                <div class="card-header" style="background: #D6DBDF;color:#000000;text-transform:uppercase;font-weight:bold;">{{ niveau }} <span style="float:right;text-transform:lowercase;">{{validite.dateDebut|date:'d-m-Y'}} à  {{validite.dateFin|date:'d-m-Y'}}</span><h3 class="card-title"></h3>
                </div>
                <div class="card-body">
                   <!-- <p>*<i style="color:red;">Cliquez sur le code ECUE pour voir les détails</i></p> -->
                    <table class="table table-bordered">
                        <thead>
                            <th></th>
                            <th>Lundi</th>
                            <th>Mardi</th>
                            <th>mercredi</th>
                            <th>Jeudi</th>
                            <th>Vendredi</th>
                            <th>Samedi</th>
                        </thead>
                       <tbody>
                            <tr>
                                <td>Matin</td>
                                <td>
                                    {% for code in p_lundi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_lun|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_lun}}</span> <br/>{% if code.lundi %}({{code.lundi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#details{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_lun}} {% if code.lundi %}({{code.lundi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalle{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'lundi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_lun }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}

                                </td>
                                <td>
                                    {% for code in p_mardi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_mar|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_mar}}</span> <br/>{% if code.mardi %}({{code.mardi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsmar{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                        {% if code.id|is_salle_added:'mardi' == 'existe' %}{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_mar}} {% if code.mardi %}({{code.mardi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleMar{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'mardi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_mar }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_mercredi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_mer|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_mer}}</span> <br/>{% if code.mercredi %}({{code.mercredi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsmer{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_mer}} {% if code.mercredi %}({{code.mercredi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleMer{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'mercredi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_mer }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_jeudi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_jeu|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_jeu}}</span> <br/>{% if code.jeudi %}({{code.jeudi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsjeu{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_jeu}} {% if code.jeudi %}({{code.jeudi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleJeu{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'jeudi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_jeu }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_vendredi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_ven|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_ven}}</span> <br/>{% if code.vendredi %}({{code.vendredi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsven{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_ven}} {% if code.vendredi %}({{code.vendredi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleVen{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'vendredi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_ven }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_samedi_m %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_sam|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_sam}}</span> <br/>{% if code.samedi %}({{code.samedi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailssam{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_sam}} {% if code.samedi %}({{code.samedi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleSam{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'samedi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_sam }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                            <tr>
                                <td>Soir</td>
                                <td>
                                    {% for code in p_lundi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_lun|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_lun}}</span> <br/>{% if code.lundi %}({{code.lundi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#details{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_lun}} {% if code.lundi %}({{code.lundi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalle{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'lundi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_lun }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_mardi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_mar|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_mar}}</span> <br/>{% if code.mardi %}({{code.mardi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsmar{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_mar}} {% if code.mardi %}({{code.mardi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleMar{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'mardi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_mar }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_mercredi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_mer|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_mer}}</span> <br/>{% if code.mercredi %}({{code.mercredi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsmer{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                        {% if code.id|is_salle_added:'mercredi' == 'existe' %}{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_mer}} {% if code.mercredi %}({{code.mercredi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleMer{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'mercredi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_mer }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_jeudi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_jeu|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_jeu}}</span> <br/>{% if code.jeudi %}({{code.jeudi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsjeu{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_jeu}} {% if code.jeudi %}({{code.jeudi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleJeu{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'jeudi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_jeu }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_vendredi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_ven|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_ven}}</span> <br/>{% if code.vendredi %}({{code.vendredi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailsven{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_ven}} {% if code.vendredi %}({{code.vendredi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleVen{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'vendredi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_ven }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                                <td>
                                    {% for code in p_samedi_s %}
                                    {% if niveau == code.niveau %}
                                    {% if code.type_sam|get_edt_type_jour %}
                                        <span
                                            data-toggle="modal" data-target="#details{{code.id}}"
                                            style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                            >{{code.ecue.code}}
                                        </span>
                                        <p style="font-size:14px;margin-bottom:-10px;color:red;">
                                            <span style="color:red;font-weight:bold;">{{code.type_sam}}</span> <br/>{% if code.samedi %}({{code.samedi}}){% endif %}
                                        </p>
                                        <hr/>
                                    {% else %}
                                    <span
                                        data-toggle="modal" data-target="#detailssam{{code.id}}"
                                        style="{% if code.ecue.code in SDM1 %} color:#00BFFF; {% elif code.ecue.code in TES2 %} color:#FFC300; {% elif code.ecue.code in ARHAI3 %} color:#20B2AA; {% elif code.ecue.code in MPSI4 %} color:#FF00FF; {% endif %}"
                                        >{{code.ecue.code}}
                                    </span>
                                    <p style="font-size:12px;margin-bottom:-10px;">{{code.type_sam}} {% if code.samedi %}({{code.samedi}}){% endif %}</p>
                                    <p style="margin-top:8px;">
                                        <i class="fa fa-home" data-toggle="modal" data-target="#addsalleSam{{code.id}}"></i>
                                        {% if code.id|is_salle_added:'samedi' == 'existe' %}<span style="font-size:12px;margin-bottom:-10px;"> {{ code.salle_sam }}</span>{% else %}<span style="color:#000000;">*</span>{% endif %}
                                    </p>
                                    <hr/>
                                    {% endif %}
                                    {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                       </tbody>
                   </table><br/>
                </div>
            </div>
            {% endfor %}

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

{% endblock content %}


{% block custom_js %}

{% endblock custom_js %}