{% load static %}
{% load custom_tag %}


{% url 'Scolarite:inscription_profile_home' as inscription_profile_home %}
{% url 'Scolarite:edit_profil' as edit_profil %}
{% url 'liste_concours' as liste_concours %}
{% url 'postuler' as postuler %}
{% url 'liste_document' as liste_document %}
{% url 'add_document' as add_document %}
{% url 'view_document' as view_document %}
{% url 'fiches_et_recus' as fiches_et_recus %}
{% url 'reclamation_home' as reclamation_home %}
{% url 'reclamation_reponse' as reclamation_reponse %}
{% url 'Scolarite:add_photo' as add_photo %}
{% url 'resultat_home' as resultat_home %}
{% url 'manage_password' as manage_password %}


<div class="sidebar profil-sidebar">
  <div class="post-item sidebar-about">
    <!--<center>
      <img src="/static/assets/img/logoUsp.jpg" alt="">
    </center><br/> -->
    <h4>MENU PRINCIPAL</h4><hr/>
    <center>  {% if etudiant.avatar %}
    <img src="{{user.avatar.url}}" alt="photo" width="210" height="225" border="1">
    {% else %}
    <img src="{% static 'inscription/assets/img/user-default2.png' %}" alt="photo" width="225" height="225">
    {% endif %} </center><br/>
    <ul>
      <a href="{% url 'Scolarite:inscription_profile_home' %}"><li style="border-top:1px solid #CECECE;" class="{% if request.path == inscription_profile_home or 'edit_profil' in request.path %}active-profil-sidebar{% endif %}"><i class="bi bi-person-fill"></i> Accueil </li></a>
      <a href="{% url 'Scolarite:add_photo' %}"><li class="{% if request.path == add_photo %}active-profil-sidebar{% endif %}"><i class="bi bi-file-earmark-image"></i> Ajouter une photo</li></a>
      <a href="#"><li class="{% if request.path == liste_concours or 'postuler' in request.path %}active-profil-sidebar{% endif %}"><i class="bi bi-mortarboard-fill"></i> Choisir l'UFR</li></a>
      <a href="#"><li class="{% if request.path == liste_document or 'add_document' in request.path or 'view_document' in request.path %}active-profil-sidebar{% endif %}"><i class="bi bi-file-earmark-fill"></i> Ajouter des Documents</li></a>
      <a href="#"><li class="{% if request.path == fiches_et_recus %}active-profil-sidebar{% endif %}"><i class="bi bi-joystick"></i> Fiches & Reçus</li></a>
      <a href="#"><li class="{% if request.path == reclamation_home or 'reclamation_reponse' in request.path %}active-profil-sidebar{% endif %}"><i class="bi bi-chat-fill"></i> Réclamations</li></a>
      {% if candidature.status == 'approuvée' %}
      <a href="#"><li style="background-color:orange;" class="{% if request.path == resultat_home %}active-profil-sidebar{% endif %}" class="resultat-cd"><i class="bi bi-calendar-date-fill"></i> Résultats</li></a>
      {% endif %}
      <!--
      <a href="#"><li><i class="bi bi-calendar2-check-fill"></i> Rendez-vous</li></a>
      <a href="#"><li><i class="bi bi-bell-fill"></i> Notifications</li></a>
      -->
      <a href="#"><li class="{% if request.path == manage_password %}active-profil-sidebar{% endif %}"><i class="bi bi-lock-fill"></i> Mot de passe</li></a>
      <a href="{% url 'Scolarite:ins_logout' %}"><li><i class="bi bi-arrow-left-circle-fill"></i> Déconnexion</li></a>
    </ul>
  </div>

</div><!-- End sidebar -->