diff --git a/app/models/etudiants.py b/app/models/etudiants.py index ce4a60b5..2dab949c 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -108,13 +108,13 @@ class Identite(db.Model): return r[0] if r else None def inscription_courante_date(self, date_debut, date_fin): - """La première inscription à un formsemestre entre date_debut et date_fin. - None s'il n'y en a pas (ou plus, ou pas encore). + """La première inscription à un formsemestre incluant la + période [date_debut, date_fin] """ r = [ ins for ins in self.formsemestre_inscriptions - if ins.formsemestre.est_courant_date(date_debut, date_fin) + if ins.formsemestre.contient_periode(date_debut, date_fin) ] return r[0] if r else None diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 85951961..28be4155 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -146,8 +146,9 @@ class FormSemestre(db.Model): today = datetime.date.today() return (self.date_debut <= today) and (today <= self.date_fin) - def est_courant_date(self, date_debut, date_fin) -> bool: - """Vrai si date_debut et date_fin est dans le semestre + def contient_periode(self, date_debut, date_fin) -> bool: + """Vrai si l'intervalle [date_debut, date_fin] est + inclus dans le semestre. (les dates de début et fin sont incluses) """ return (self.date_debut <= date_debut) and (date_fin <= self.date_fin) diff --git a/app/templates/entreprises/_contact.html b/app/templates/entreprises/_contact.html index 5b07c1e2..e7083a26 100644 --- a/app/templates/entreprises/_contact.html +++ b/app/templates/entreprises/_contact.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #}
Nom : {{ contact.nom }}
diff --git a/app/templates/entreprises/_offre.html b/app/templates/entreprises/_offre.html
index fd21211d..ea69110e 100644
--- a/app/templates/entreprises/_offre.html
+++ b/app/templates/entreprises/_offre.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
Intitulé : {{ offre[0].intitule }}
diff --git a/app/templates/entreprises/ajout_entreprise.html b/app/templates/entreprises/ajout_entreprise.html
index 4a70e83d..15cf174f 100644
--- a/app/templates/entreprises/ajout_entreprise.html
+++ b/app/templates/entreprises/ajout_entreprise.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
diff --git a/app/templates/entreprises/ajout_historique.html b/app/templates/entreprises/ajout_historique.html
index f4da2661..c0a546d5 100644
--- a/app/templates/entreprises/ajout_historique.html
+++ b/app/templates/entreprises/ajout_historique.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
diff --git a/app/templates/entreprises/contacts.html b/app/templates/entreprises/contacts.html
index f4ae3f71..22fb1be9 100644
--- a/app/templates/entreprises/contacts.html
+++ b/app/templates/entreprises/contacts.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% block app_content %}
diff --git a/app/templates/entreprises/delete_confirmation.html b/app/templates/entreprises/delete_confirmation.html
index 06b75b6a..4894bca3 100644
--- a/app/templates/entreprises/delete_confirmation.html
+++ b/app/templates/entreprises/delete_confirmation.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
diff --git a/app/templates/entreprises/entreprises.html b/app/templates/entreprises/entreprises.html
index 9cbe2330..fe790a8d 100644
--- a/app/templates/entreprises/entreprises.html
+++ b/app/templates/entreprises/entreprises.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% block app_content %}
diff --git a/app/templates/entreprises/envoi_offre_form.html b/app/templates/entreprises/envoi_offre_form.html
index c9db2c6c..f67cb4e4 100644
--- a/app/templates/entreprises/envoi_offre_form.html
+++ b/app/templates/entreprises/envoi_offre_form.html
@@ -1,3 +1,4 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
diff --git a/app/templates/entreprises/fiche_entreprise.html b/app/templates/entreprises/fiche_entreprise.html
index f3cc6826..9bb20a8a 100644
--- a/app/templates/entreprises/fiche_entreprise.html
+++ b/app/templates/entreprises/fiche_entreprise.html
@@ -1,72 +1,76 @@
+{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% block app_content %}
- {% if logs %}
-
- SIRET : {{ entreprise.siret }}
- Nom : {{ entreprise.nom }}
- Adresse : {{ entreprise.adresse }}
- Code postal : {{ entreprise.codepostal }}
- Ville : {{ entreprise.ville }}
- Pays : {{ entreprise.pays }}
-
+ SIRET : {{ entreprise.siret }}
+ Nom : {{ entreprise.nom }}
+ Adresse : {{ entreprise.adresse }}
+ Code postal : {{ entreprise.codepostal }}
+ Ville : {{ entreprise.ville }}
+ Pays : {{ entreprise.pays }}
+