kpsul/gestioncof/templates/petits_cours_demandes_list.html
2016-07-25 19:19:07 +02:00

47 lines
1.9 KiB
HTML

{% extends "base_title_petitscours.html" %}
{% load staticfiles %}
{% block realcontent %}
<h2>Demandes de petits cours</h2>
{% if object_list %}
<table>
<thead>
<th style="width: 30%;">Nom</th>
<th style="width: 30%;">Matières</th>
<th style="width: 20%;">Date</th>
<th>Traitée</th>
<th>par</th>
<th></th>
</thead>
<tbody>
{% for demande in object_list %}
<tr>
<td>{{ demande.name }}</td>
<td>{% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</td>
<td>{{ demande.created|date:"d E Y" }}</td>
<td style="text-align: center;"><img src="{% if demande.traitee %}{% static "images/yes.png" %}{% else %}{% static "images/no.png" %}{% endif %}" /></td>
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<img src="{% static "images/none.png" %}" />{% endif %}</td>
<td><a href="{% url "petits-cours-demande-details" demande.id %}" class="see_detail">Détails</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if is_paginated %}
<div class="pagination">
<span class="page-links">
{% if page_obj.has_previous %}
<a href="{% url "petits-cours-demandes-list" %}?page={{ page_obj.previous_page_number }}">&lt;</a>
{% endif %}
<span class="page-current">
Page {{ page_obj.number }} sur {{ page_obj.paginator.num_pages }}
</span>
{% if page_obj.has_next %}
<a href="{% url "petits-cours-demandes-list" %}?page={{ page_obj.next_page_number }}">&gt;</a>
{% endif %}
</span>
</div>
{% endif %}
{% else %}
<p>Aucune demande :(</p>
{% endif %}
{% endblock %}