From 10e0a5cceb0533ee6664f766a710a071cad7b9bc Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 25 Mar 2024 16:34:18 +0100 Subject: [PATCH] factor navigation in base.html --- tournaments/templates/tournaments/base.html | 6 +++++ .../templates/tournaments/group_stages.html | 13 +++------ .../templates/tournaments/matches.html | 18 +++++-------- .../templates/tournaments/summons.html | 27 +++++++++---------- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/tournaments/templates/tournaments/base.html b/tournaments/templates/tournaments/base.html index 1d80a21..131f31e 100644 --- a/tournaments/templates/tournaments/base.html +++ b/tournaments/templates/tournaments/base.html @@ -41,6 +41,12 @@ + +
{% block content %} diff --git a/tournaments/templates/tournaments/group_stages.html b/tournaments/templates/tournaments/group_stages.html index 00ef44a..1012f61 100644 --- a/tournaments/templates/tournaments/group_stages.html +++ b/tournaments/templates/tournaments/group_stages.html @@ -6,15 +6,10 @@ {% block content %} -
- Matches - Poules - Convocations +
+ {% for group_stage in group_stages %} + {% include 'tournaments/group_stage_cell.html' %} + {% endfor %}
-
- {% for group_stage in group_stages %} - {% include 'tournaments/group_stage_cell.html' %} - {% endfor %} -
{% endblock %} diff --git a/tournaments/templates/tournaments/matches.html b/tournaments/templates/tournaments/matches.html index c33ab1e..8df8f07 100644 --- a/tournaments/templates/tournaments/matches.html +++ b/tournaments/templates/tournaments/matches.html @@ -6,18 +6,12 @@ {% block content %} -
- Matches - Poules - Convocations + {% if matches %} +
+ {% for match in matches %} + {% include 'tournaments/match_cell.html' %} + {% endfor %}
- - {% if matches %} -
- {% for match in matches %} - {% include 'tournaments/match_cell.html' %} - {% endfor %} -
- {% endif %} + {% endif %} {% endblock %} diff --git a/tournaments/templates/tournaments/summons.html b/tournaments/templates/tournaments/summons.html index edd47a9..1a5c589 100644 --- a/tournaments/templates/tournaments/summons.html +++ b/tournaments/templates/tournaments/summons.html @@ -8,24 +8,23 @@ {% load static %} - + {% if team_summons %} -
+
-
-
- {% for summon in team_summons %} +
+
+ {% for summon in team_summons %} - {% include 'tournaments/summon_row.html' %} + {% include 'tournaments/summon_row.html' %} - {% endfor %} + {% endfor %} -
-
+
+
+ +
+ + {% endif %} -
{% endblock %}