From 16359c0241ad6e33c8c3f25d429e05cb72ded9fb Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Tue, 30 Jan 2024 08:41:50 +0100 Subject: [PATCH] Optimisation for smartphone screen and minor updates --- jarvis/followup/models.py | 13 +++++++--- .../templates/intensities/details.html | 2 +- .../followup/templates/intensities/list.html | 26 ++++++++++++++----- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/jarvis/followup/models.py b/jarvis/followup/models.py index 0e359b8..211f5a5 100644 --- a/jarvis/followup/models.py +++ b/jarvis/followup/models.py @@ -545,11 +545,16 @@ class Note(Markdownizable, Seasonisable): class Intensity(Markdownizable, Seasonisable): """Classe représentant l'intensité d'un entraînement - L'intensité va prendre 4 valeurs : - - la temps (en minute), + L'intensité va prendre 9 valeurs : + - le temps (en minute), + - le temps théorique - la difficulté (en 10 ème), - - la quantité de figure et - - le nombre de passafe. + - la difficulté demandé + - la quantité de figure + - la quantité de figure demandée + - le nombre de passage + - le nombre de passage demandé + - le nombre de gymnaste par trampoline Avec ces 4 informations, la classe va en calculer 4 autres : - la difficulté moyenne par passage diff --git a/jarvis/followup/templates/intensities/details.html b/jarvis/followup/templates/intensities/details.html index 0c4fe77..e3b536c 100644 --- a/jarvis/followup/templates/intensities/details.html +++ b/jarvis/followup/templates/intensities/details.html @@ -153,7 +153,7 @@ {% if intensity.to_markdown %}
-

More details

+

More details

{{ intensity.to_markdown | safe }}
{% endif %} diff --git a/jarvis/followup/templates/intensities/list.html b/jarvis/followup/templates/intensities/list.html index 7522ee4..f394339 100644 --- a/jarvis/followup/templates/intensities/list.html +++ b/jarvis/followup/templates/intensities/list.html @@ -64,13 +64,25 @@ - {% if intensity.mean_time_by_passe > 4.13 %} - {{ intensity.mean_time_by_passe | floatformat:2 }} - {% elif intensity.mean_time_by_passe > 3.80 %} - {{ intensity.mean_time_by_passe | floatformat:2 }} - {% else %} - {{ intensity.mean_time_by_passe | floatformat:2 }} - {% endif %} + {% if intensity.number_of_gymnast == 2 %} + {% if intensity.mean_time_by_passe > 3.50 %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% elif intensity.mean_time_by_passe > 3.20 %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% else %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% endif %} + {% elif intensity.number_of_gymnast == 3 %} + {% if intensity.mean_time_by_passe > 5.05 %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% elif intensity.mean_time_by_passe > 4.40 %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% else %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% endif %} + {% else %} + {{ intensity.mean_time_by_passe | floatformat:3 }} + {% endif %} {{ intensity.mean_difficulty_by_passe_in_unit | floatformat:2 }}