{%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 Projects</h4>
        {% if messages %}
        <ul class="messages" style="text-align: left; color: lightgreen; list-style-type: none">
            {% for message in messages %}
            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
            {% endfor %}
        </ul>
        {% endif %}
     <table class="table table-hover table-striped" summary="project_list">
         {% if all_project_list %}
             <thead>
                                        
             <th>Name</th>
             <th>Start Date</th>
             <th>End Date</th>
             <th>Status</th>
			 <th>Delete</th>
                                        
             </thead>
             <tbody>
             {% for proj in all_project_list  %}
                 <tr>
                    <td><a href="{% url 'project_detail' request.user.username proj.name %}">{{ proj.name }}</a></td>
                     <td>{{ proj.start_date }}</td>
                     <td>{{ proj.end_date }}</td>
                     {% if proj.status == '0' %}
                         <td>Open</td>
                     {% else %}
                         <td>Closed</td>
                     {% endif %}
					 <td style="text-align:center">
                        <a href="{% url 'delete_project' request.user.username proj.name %}">
                            <div class="font-icon-detail">
							<i class="pe-7s-trash"></i>
                            </div>
                       </a>
                    </td>
                 </tr>
             {% endfor %}
             </tbody>
         {% else %}
             <p>No project have been created</p>
         {% endif %}
     </table>
  {%include "users/includes/pagni.html" with page=all_project_list %}

</div>
{% endblock%}