Add message about supplies. Close #6

This commit is contained in:
Gabriel Augendre 2018-05-30 18:14:53 +02:00
parent 1ec152f6c7
commit 120d4d94ef
3 changed files with 18 additions and 0 deletions

View file

@ -10,6 +10,11 @@
{% block title %}Ajouter {{ item }}{% endblock %}
<a href="{% url 'list_books' teacher.pk %}" class="btn btn-secondary">Retour à la liste des {{ item_plural }}</a>
</h2>
{% if message_template %}
<div class="alert alert-info">
{% include message_template %}
</div>
{% endif %}
<form action="" method="post" class="form">
{% csrf_token %}
{% bootstrap_form form %}

View file

@ -0,0 +1,10 @@
En complément des fournitures communes à tous les élèves, à savoir :
<ul>
<li>cahier de textes ou agenda</li>
<li>trousse complète (y compris gomme, taille-crayons, blanc correcteur, bâtons de colle, règle 30 cm., surligneurs 4 couleurs&#8230;)</li>
<li>1 paire de ciseaux</li>
<li>clé(s) USB</li>
<li>1 agrafeuse</li>
<li>crayons de couleurs (minimum 12)</li>
<li>système de reliure (baguettes sans perçage, transparents, papier épais,&#8230;) pour les éventuels dossiers de fin dannée</li>
</ul>

View file

@ -63,11 +63,13 @@ class AddItemView(BaseTeacherView, CreateView):
item_text = None
item_text_plural = None
success_target = None
message_template = None
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['item'] = self.item_text
context['item_plural'] = self.item_text_plural
context['message_template'] = self.message_template
return context
def get_initial(self):
@ -108,6 +110,7 @@ class AddSuppliesView(AddItemView):
success_target = 'add_supplies'
item_text = 'des fournitures'
item_text_plural = 'fournitures'
message_template = 'manuels/supplies_message.html'
def clear_teacher_view(request):