46 lines
1.9 KiB
HTML
46 lines
1.9 KiB
HTML
{% extends "base_title_petitscours.html" %}
|
|
|
|
{% block realcontent %}
|
|
<h3>Demandes de petits cours</h3>
|
|
{% 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="{{ MEDIA_URL }}/images/{% if demande.traitee %}yes.png{% else %}no.png{% endif %}" /></td>
|
|
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<img src="{{ MEDIA_URL }}/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 }}"><</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 }}">></a>
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<p>Aucune demande :(</p>
|
|
{% endif %}
|
|
{% endblock %}
|