diff --git a/stages/models.py b/stages/models.py index d0a7810..45bb91b 100644 --- a/stages/models.py +++ b/stages/models.py @@ -18,6 +18,10 @@ class Section(models.Model): def __str__(self): return self.name + def is_fe(self): + """fe=formation en entreprise""" + return self.name in {'ASA', 'ASE', 'ASSC'} + class Level(models.Model): name = models.CharField(max_length=10, verbose_name='Nom') diff --git a/templates/class.html b/templates/class.html index 40583a6..71ad870 100644 --- a/templates/class.html +++ b/templates/class.html @@ -11,18 +11,21 @@ {% block content %}
| Nom, prénom | Date naiss. | Bulletins | Récapitulatif des stages | +Nom, prénom | Date naiss. | {% if klass.section.is_fe %}Bulletins | {% endif %}Récapitulatif des stages | {% for student in students %}
|---|---|---|---|
| {{ student }} | {{ student.birth_date }} | + {% if klass.section.is_fe %}{% if student.report_sem1 %}Sem. 1
{% if student.report_sem1_sent %} |
+ {% endif %}
{% for train in student.training_set.all %}
{{ train.availability.period }} {{ train.availability.corporation }} {% if train.comment %} |