diff --git a/suivi/templates/suivi/details.html b/suivi/templates/suivi/details.html index f500d7d..7aa7dd1 100644 --- a/suivi/templates/suivi/details.html +++ b/suivi/templates/suivi/details.html @@ -1,10 +1,2 @@ - - -
-
{% include "suivi/sujet_suivi.html" %}
-
{% include "sujets/sujet_details_inner.html" %}
-
- Notes : {{ notes }} +
{% include "suivi/sujet_suivi.html" %}
+
{% include "sujets/sujet_details_inner.html" %}
diff --git a/suivi/templates/suivi/sujet_suivi.html b/suivi/templates/suivi/sujet_suivi.html index c70a2dc..6699d65 100644 --- a/suivi/templates/suivi/sujet_suivi.html +++ b/suivi/templates/suivi/sujet_suivi.html @@ -1,13 +1,12 @@ {% load notes %} -
-
-

Notes - Total : {{ notes.count }}

-
- - {% for note in notes %} - {% inline_table note %} - {% endfor %} -
+
+

Notes + Total : {{ notes.count }}

+ + {% for note in notes %} + {% inline_table note header="date" %} + {% endfor %} +
+ diff --git a/suivi/views.py b/suivi/views.py index 0a2d63c..918462d 100644 --- a/suivi/views.py +++ b/suivi/views.py @@ -28,5 +28,5 @@ class SuiviSujetView(SuivisView, generic.DetailView): def get_context_data(self, *args, **kwargs): context = super().get_context_data(*args, **kwargs) - context['notes'] = self.object.notes.all() + context['notes'] = self.object.notes.all().order_by('created_date') return context diff --git a/sujets/models.py b/sujets/models.py index f011e62..5d1d715 100644 --- a/sujets/models.py +++ b/sujets/models.py @@ -121,4 +121,4 @@ class Sujet(Personne): ) def get_absolute_url(self): - return reverse('suivis:details', kwargs={'pk': self.id}) + return reverse('suivi:details', kwargs={'pk': self.id}) diff --git a/sujets/templates/sujets/sujet_details_inner.html b/sujets/templates/sujets/sujet_details_inner.html index ab5f51b..63ee2ad 100644 --- a/sujets/templates/sujets/sujet_details_inner.html +++ b/sujets/templates/sujets/sujet_details_inner.html @@ -1,76 +1,24 @@ -
-
-
-

Première rencontre le {{sujet.premiere_rencontre}}

-
-
- +
+

Fiche informations

+

Première rencontre : {{ sujet.premiere_rencontre }}

+ + + + + + + + + + + + + +
État-civil
Nom{{ sujet.nom|default:'?' }}Prénom{{ sujet.prenom|default:'?' }}
Sexe{{ sujet.genre }}Âge{{ sujet.age|default:'?' }}
Problématiques
Psychiatrique{{ sujet.prob_psychiatrie }}Addiction{{ sujet.prob_addiction }}
Administratif{{ sujet.prob_administratif }}Somatique{{ sujet.prob_somatique }}
Habitation
Type{{ sujet.habitation }}Connu du SIAO{{ sujet.connu_siao }}
Ressources
{{ sujet.ressources }}
Parcours de vie
{{ sujet.parcours_de_vie }}Lien familial{{ sujet.lien_familial }}
+ -
-
-
-
- État-civil -
-
-

Nom : {{ sujet.nom|default:'?' }}

-

Prénom : {{ sujet.prenom|default:'?' }}

-

Sexe : {{ sujet.genre }}

-

Âge : {{ sujet.age|default:'?' }}

-
-
-
-
-
-
- Problématiques -
-
-

Psychiatrique : {{ sujet.prob_psychiatrie }}

-

Administratif : {{ sujet.prob_administratif }}

-

Addiction : {{ sujet.prob_addiction }}

-

Somatique : {{ sujet.prob_somatique }}

-
-
-
- -
-
-
- Habitation -
-
-

-

Type : {{ sujet.habitation }}

-

Connu du SIAO : {{ sujet.connu_siao }}

-
-
-
- -
-
-
- Ressources -
-
-

{{ sujet.ressources }}

-
-
-
- -
-
-
- Parcours de vie -
-
-

Parcours : {{ sujet.parcours_de_vie }}

-

Lien familial : {{ sujet.lien_familial }}

-
-
-
-
+
+