{%extends "users/base.html" %}
{% block navi_content %}
    {%include "users/includes/navicontents_admin.html" %}
{% endblock %}
{% block usernavi_content %}
    {%include "users/includes/usernavicontents_admin.html" %}
{% endblock %}

{% block main_content %}
 <div class="content table-responsive table-full-width" >
     <h4>List of Leader</h4>
     <table class="table table-hover table-striped" summary="leader_user_list">
         {% if leader_list %}
             <thead>

             <th>Username</th>
             <th>First Name</th>
             <th>Last Name</th>
             <th>Email Address</th>
             <th style="text-align:center">Edit</th>
             <th style="text-align:center" >Delete</th>

             </thead>
             <tbody>
             {% for l in leader_list %}
                 <tr>

                     <td><a href="{% url 'display_leader' l.username %}">{{ l.username }}</a></td>
                     <td>{{ l.first_name }}</td>
                     <td>{{ l.last_name }}</td>
                     <td>{{ l.email }}</td>
                     <td style="text-align:center">
                         <a href="{% url 'update_leader' l.username %}">
                             <div class="font-icon-detail"><i class="pe-7s-note"></i>
                             </div>
                         </a>
                     </td>

                     <td style="text-align:center">
                         <a href="{% url 'delete_user' request.user.username l.username %}">
                             <div class="font-icon-detail"><i class="pe-7s-trash"></i>
                             </div>
                         </a>
                     </td>


                 </tr>
             {% endfor %}
             </tbody>
         {% else %}
             <p>No leaders have been created</p>
         {% endif %}
     </table>
     {%include "users/includes/pagni.html" with page=leader_list %}

</div>
{% endblock%}