147 lines
No EOL
7 KiB
HTML
147 lines
No EOL
7 KiB
HTML
{% extends 'manuels/base.html' %}
|
|
|
|
{% load bootstrap4 %}
|
|
|
|
{% block title %}Livres et fournitures demandés{% endblock %}
|
|
|
|
{% 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">
|
|
<h4 class="alert-heading"><i class="fas fa-exclamation-triangle"></i> Attention</h4>
|
|
<p class="mb-0">
|
|
Le lien permettant d'accéder à cette page vous est personnel et vous a été envoyé par email.
|
|
N'oubliez pas de vérifier vos courriers indésirables.<br>
|
|
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">
|
|
<h2>
|
|
Liste des livres demandés
|
|
{% if not teacher.has_confirmed_list %}
|
|
<a href="{% url 'add_book' pk=teacher.pk %}" class="btn btn-primary">
|
|
<i class="fas fa-plus-circle"></i> Ajouter un livre
|
|
</a>
|
|
{% endif %}
|
|
</h2>
|
|
<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 %}
|
|
<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>
|
|
<th scope="col">Consommable</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for book in teacher.book_set.all %}
|
|
<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 %}
|
|
<td>{{ book.level }}</td>
|
|
<td>{{ book.field }}</td>
|
|
<td>{{ book.title }}</td>
|
|
<td>{{ book.authors }}</td>
|
|
<td>{{ book.editor }}{% if book.other_editor %}
|
|
({{ book.other_editor }})
|
|
{% endif %}</td>
|
|
<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>
|
|
<td>
|
|
<i class="fas fa-{% if book.consumable %}check-circle{% else %}ban{% endif %}"></i>
|
|
{{ book.consumable_text }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</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>
|
|
<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 %}
|
|
<th scope="col">Classe</th>
|
|
<th scope="col">Discipline</th>
|
|
<th scope="col">Liste de fournitures</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for supply in teacher.suppliesrequirement_set.all %}
|
|
<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 %}
|
|
<td>{{ supply.level }}</td>
|
|
<td>{{ supply.field }}</td>
|
|
<td>{{ supply.supplies|linebreaksbr }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |