Change wording
This commit is contained in:
parent
02d5f86e48
commit
323a5d86ea
7 changed files with 96 additions and 51 deletions
34
src/manuels/migrations/0039_auto_20220615_2016.py
Normal file
34
src/manuels/migrations/0039_auto_20220615_2016.py
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Generated by Django 3.2.13 on 2022-06-15 18:16
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import manuels.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("manuels", "0038_auto_20210510_0854"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="book",
|
||||||
|
name="isbn",
|
||||||
|
field=models.CharField(
|
||||||
|
help_text="Format attendu : 10 ou 13 chiffres, éventuellement séparés par des tirets et éventuellement suivis de la lettre <code>X</code>. La recherche sur Decitre ne fonctionnera qu'avec un code ISBN à 13 chiffres (ou EAN)",
|
||||||
|
max_length=20,
|
||||||
|
validators=[manuels.models.isbn_validator],
|
||||||
|
verbose_name="ISBN/EAN du livre ou consommable demandé (hors specimen)",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="book",
|
||||||
|
name="previously_acquired",
|
||||||
|
field=models.BooleanField(
|
||||||
|
choices=[(None, "------------"), (False, "Non"), (True, "Oui")],
|
||||||
|
default=None,
|
||||||
|
verbose_name="Livre ou consommable déjà acquis par l'élève les années précédentes",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -240,7 +240,7 @@ class Book(BaseModel):
|
||||||
other_editor = models.CharField(verbose_name="préciser", max_length=100, blank=True)
|
other_editor = models.CharField(verbose_name="préciser", max_length=100, blank=True)
|
||||||
publication_year = models.PositiveIntegerField("année de publication")
|
publication_year = models.PositiveIntegerField("année de publication")
|
||||||
isbn = models.CharField(
|
isbn = models.CharField(
|
||||||
"ISBN/EAN du manuel élève (hors specimen)",
|
"ISBN/EAN du livre ou consommable demandé (hors specimen)",
|
||||||
max_length=20,
|
max_length=20,
|
||||||
help_text="Format attendu : 10 ou 13 chiffres, éventuellement séparés par des tirets et éventuellement "
|
help_text="Format attendu : 10 ou 13 chiffres, éventuellement séparés par des tirets et éventuellement "
|
||||||
"suivis de la lettre <code>X</code>. La recherche sur Decitre ne fonctionnera qu'avec un code ISBN à "
|
"suivis de la lettre <code>X</code>. La recherche sur Decitre ne fonctionnera qu'avec un code ISBN à "
|
||||||
|
@ -254,7 +254,7 @@ class Book(BaseModel):
|
||||||
(True, "Oui"),
|
(True, "Oui"),
|
||||||
)
|
)
|
||||||
previously_acquired = models.BooleanField(
|
previously_acquired = models.BooleanField(
|
||||||
"manuel acquis précédemment par l'élève",
|
"Livre ou consommable déjà acquis par l'élève les années précédentes",
|
||||||
choices=YES_NO_CHOICE,
|
choices=YES_NO_CHOICE,
|
||||||
blank=False,
|
blank=False,
|
||||||
default=None,
|
default=None,
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="d-flex flex-column min-vh-100">
|
<div class="d-flex flex-column min-vh-100">
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||||
<a class="navbar-brand" href="{% url 'home_page' %}">Manuels scolaires</a>
|
<a class="navbar-brand" href="{% url 'home_page' %}">Fournitures, consommables ou livres supplémentaires</a>
|
||||||
{% if user.is_authenticated or teacher and teacher.email in authorized_mails %}
|
{% if user.is_authenticated or teacher and teacher.email in authorized_mails %}
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||||
data-target="#navbarSupportedContent"
|
data-target="#navbarSupportedContent"
|
||||||
|
|
7
src/manuels/templates/manuels/books_message.html
Normal file
7
src/manuels/templates/manuels/books_message.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<h4 class="alert-heading"><i class="fas fa-info-circle"></i> Information</h4>
|
||||||
|
<p class="mb-0">
|
||||||
|
Indiquer uniquement les livres autres que les manuels des matières générales
|
||||||
|
(Français / Maths / Histoire / Géo / EMC / Physique-Chimie / PSE / Langues)
|
||||||
|
</p>
|
||||||
|
</div>
|
|
@ -28,6 +28,53 @@
|
||||||
et vous ne pourrez plus ajouter de livre à votre liste.
|
et vous ne pourrez plus ajouter de livre à votre liste.
|
||||||
</p>
|
</p>
|
||||||
</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>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h2>
|
<h2>
|
||||||
|
@ -40,6 +87,9 @@
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="alert alert-info" role="alert">
|
||||||
|
Autres que les manuels des matières générales (Français / Maths / Histoire / Géo / EMC / Physique-Chimie / PSE / Langues)
|
||||||
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover table-sm">
|
<table class="table table-hover table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -99,51 +149,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 %}
|
{% endblock %}
|
||||||
|
|
|
@ -124,6 +124,7 @@ class BookView:
|
||||||
class AddBookView(BookView, AddItemView):
|
class AddBookView(BookView, AddItemView):
|
||||||
form_class = AddBookForm
|
form_class = AddBookForm
|
||||||
template_name = "manuels/add_book.html"
|
template_name = "manuels/add_book.html"
|
||||||
|
message_template = "manuels/books_message.html"
|
||||||
|
|
||||||
def form_valid(self, form: AddBookForm):
|
def form_valid(self, form: AddBookForm):
|
||||||
for level in form.cleaned_data["levels"]:
|
for level in form.cleaned_data["levels"]:
|
||||||
|
|
2
tasks.py
2
tasks.py
|
@ -66,7 +66,7 @@ def publish(ctx: Context) -> None:
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def deploy(ctx: Context) -> None:
|
def deploy(ctx: Context) -> None:
|
||||||
ctx.run("ssh ubuntu /home/gaugendre/checkout/update", pty=True, echo=True)
|
ctx.run("ssh ubuntu /home/gaugendre/manuels/update", pty=True, echo=True)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
|
|
Loading…
Reference in a new issue