From 4597b859f58c56647c62767d2e9bfd1d7f2935b9 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Fri, 29 Mar 2024 14:06:05 +0100 Subject: [PATCH] [WIP] Minor updates --- jarvis/objective/models.py | 4 +- .../templates/gymnasttrainings/compose.html | 104 ++++++++++-------- jarvis/objective/views.py | 74 ++++++------- static/css/jarvis.css | 6 + 4 files changed, 101 insertions(+), 87 deletions(-) diff --git a/jarvis/objective/models.py b/jarvis/objective/models.py index a52eef3..12fd480 100644 --- a/jarvis/objective/models.py +++ b/jarvis/objective/models.py @@ -455,7 +455,7 @@ class RoutineSkill(models.Model): """ class Meta: - ordering = ("rank",) + ordering = ["routine", "rank"] unique_together = ["routine", "rank"] routine = models.ForeignKey( @@ -582,7 +582,7 @@ class GymnastTrainingRound(Markdownizable): class Meta: verbose_name = "Gymnast Training Round" verbose_name_plural = "Gymnast Training Rounds" - ordering = ("rank",) + ordering = ["gymnast_training", "rank"] unique_together = ["gymnast_training", "rank"] gymnast_training = models.ForeignKey( diff --git a/jarvis/objective/templates/gymnasttrainings/compose.html b/jarvis/objective/templates/gymnasttrainings/compose.html index 9f327af..99308ad 100644 --- a/jarvis/objective/templates/gymnasttrainings/compose.html +++ b/jarvis/objective/templates/gymnasttrainings/compose.html @@ -11,41 +11,50 @@

Compose Training : {{ gymnast_training.gymnast }} - {{ gymnast_training.date|date:"l j F Y" }}

-
    - {% for training_round in training_round_list %} +
    • +
      + + + +
      +
    • + {% for gtr in gtr_list %}
    • -
      - -
      - {{ training_round.label }} -
      +
      + +
      + {{ gtr.training_round.label }}
      -
    • - {% endfor %} -
    • -
      - -
      - - -
      -
      - -
      +
      + {{ gtr.repetition }}
      +
    • -
+ {% endfor %} +
  • +
    + +
    + + +
    +
    + +
    +
    +
  • +