manuels-scolaires/manuels/templates/manuels/list_books_supplies.html

150 lines
7.1 KiB
HTML
Raw Normal View History

2018-05-21 23:12:35 +02:00
{% extends 'manuels/base.html' %}
{% load bootstrap4 %}
{% block title %}Livres et fournitures demandés{% endblock %}
2018-05-21 23:12:35 +02:00
{% block content %}
<div class="row">
<div class="col-12">
<h1>Bienvenue {{ teacher.full_name }}
<a href="{% url 'clear_teacher' %}" class="btn btn-warning">
<i class="fas fa-sign-out-alt"></i> Se déconnecter</a>
{% if not teacher.has_confirmed_list %}
<a href="{% url 'confirm_teacher' pk=teacher.pk %}" class="btn btn-danger">
<i class="fas fa-check-circle"></i> Confirmer ma liste</a>
{% endif %}
</h1>
</div>
</div>
<div class="alert alert-warning" role="alert">
2018-06-01 20:23:40 +02:00
<h4 class="alert-heading"><i class="fas fa-exclamation-triangle"></i> Attention</h4>
2018-05-22 00:45:54 +02:00
<p class="mb-0">
2018-06-02 17:26:01 +02:00
Le lien permettant d'accéder à cette page vous est personnel et vous a été envoyé par email.
2018-06-01 20:23:40 +02:00
N'oubliez pas de vérifier vos courriers indésirables.<br>
2018-05-22 00:45:54 +02:00
Pensez à <strong>sauvegarder cette page dans vos favoris</strong>.<br>
Si vous perdez ce lien, vous ne risquez de ne plus être en mesure d'accéder à votre espace personnel
et vous ne pourrez plus ajouter de livre à votre liste.
</p>
</div>
<div class="row">
<div class="col-12">
2018-05-22 00:55:14 +02:00
<h2>
Liste des livres demandés
{% if not teacher.has_confirmed_list %}
2021-07-10 16:43:33 +02:00
<a href="{% url 'add_book' pk=teacher.pk %}"
class="btn btn-primary"
id="add-book">
<i class="fas fa-plus-circle"></i> Ajouter un livre
</a>
{% endif %}
2018-05-21 23:46:47 +02:00
</h2>
2018-06-02 16:58:29 +02:00
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
2018-05-21 23:12:35 +02:00
<tr>
{% if not teacher.has_confirmed_list %}
<th scope="col">Modifier</th>
{% endif %}
2018-06-02 16:58:29 +02:00
<th scope="col">Classe</th>
<th scope="col">Discipline</th>
<th scope="col">Titre</th>
<th scope="col">Auteurs</th>
<th scope="col">Éditeur</th>
<th scope="col">Année de publication</th>
<th scope="col">ISBN</th>
<th scope="col">Prix</th>
<th scope="col">Déjà acheté par l'élève</th>
2019-04-06 19:25:04 +02:00
<th scope="col">Consommable</th>
2018-05-21 23:12:35 +02:00
</tr>
2018-06-02 16:58:29 +02:00
</thead>
<tbody>
2018-06-02 18:21:04 +02:00
{% for book in teacher.book_set.all %}
2018-06-02 16:58:29 +02:00
<tr>
{% if not teacher.has_confirmed_list %}
<th scope="row">
<div class="btn-group">
<a title="Modifier"
href="{% url 'edit_book' teacher_pk=book.teacher.pk pk=book.pk %}"
class="btn btn-sm btn-secondary"><i class="fas fa-edit"></i></a>
<a title="Supprimer"
href="{% url 'delete_book' teacher_pk=book.teacher.pk pk=book.pk %}"
class="btn btn-sm btn-danger"><i class="fas fa-trash"></i></a>
</div>
</th>
{% endif %}
2018-06-02 16:58:29 +02:00
<td>{{ book.level }}</td>
<td>{{ book.field }}</td>
<td>{{ book.title }}</td>
<td>{{ book.authors }}</td>
2018-06-10 20:04:45 +02:00
<td>{{ book.editor }}{% if book.other_editor %}
({{ book.other_editor }})
{% endif %}</td>
2018-06-02 16:58:29 +02:00
<td>{{ book.publication_year }}</td>
<td>{{ book.isbn }}</td>
<td>{{ book.price }}€</td>
<td>
<i class="fas fa-{% if book.previously_acquired %}check-circle{% else %}ban{% endif %}"></i>
{{ book.previously_acquired_text }}
</td>
2019-04-06 19:25:04 +02:00
<td>
<i class="fas fa-{% if book.consumable %}check-circle{% else %}ban{% endif %}"></i>
{{ book.consumable_text }}
</td>
2018-06-02 16:58:29 +02:00
</tr>
{% endfor %}
</tbody>
</table>
</div>
2018-05-21 23:12:35 +02:00
</div>
</div>
<div class="row">
<div class="col-12">
<h2>
Liste des fournitures demandées
{% if not teacher.has_confirmed_list %}
<a href="{% url 'add_supplies' pk=teacher.pk %}" class="btn btn-primary">
<i class="fas fa-plus-circle"></i> Ajouter des fournitures
</a>
{% endif %}
</h2>
2018-06-02 16:58:29 +02:00
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr>
{% if not teacher.has_confirmed_list %}
<th scope="col">Modifier</th>
{% endif %}
2018-06-02 16:58:29 +02:00
<th scope="col">Classe</th>
2019-04-06 19:25:04 +02:00
<th scope="col">Discipline</th>
2018-06-02 16:58:29 +02:00
<th scope="col">Liste de fournitures</th>
</tr>
2018-06-02 16:58:29 +02:00
</thead>
<tbody>
2018-06-02 18:21:04 +02:00
{% for supply in teacher.suppliesrequirement_set.all %}
2018-06-02 16:58:29 +02:00
<tr>
{% if not teacher.has_confirmed_list %}
<th scope="row">
<div class="btn-group">
<a title="Modifier"
href="{% url 'edit_supplies' teacher_pk=supply.teacher.pk pk=supply.pk %}"
class="btn btn-sm btn-secondary"><i class="fas fa-edit"></i></a>
<a title="Supprimer"
href="{% url 'delete_supplies' teacher_pk=supply.teacher.pk pk=supply.pk %}"
class="btn btn-sm btn-danger"><i class="fas fa-trash"></i></a>
</div>
</th>
{% endif %}
2018-06-02 16:58:29 +02:00
<td>{{ supply.level }}</td>
2019-04-06 19:25:04 +02:00
<td>{{ supply.field }}</td>
2018-06-02 16:58:29 +02:00
<td>{{ supply.supplies|linebreaksbr }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
2021-07-10 12:11:58 +02:00
{% endblock %}