From 313076fba503374d8a4d01156ad9d46ae565fb79 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 17:28:03 +0000 Subject: [PATCH 1/2] Fix displaying medals on scoreboard They sometimes were displaying next to each other. By using two table cells, this will never happen. --- .../partials/scoreboard_summary.html.twig | 9 ++++++--- .../templates/partials/scoreboard_table.html.twig | 15 +++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/webapp/templates/partials/scoreboard_summary.html.twig b/webapp/templates/partials/scoreboard_summary.html.twig index 4ec616b253..65666ef567 100644 --- a/webapp/templates/partials/scoreboard_summary.html.twig +++ b/webapp/templates/partials/scoreboard_summary.html.twig @@ -1,12 +1,15 @@ {% if limitToTeamIds is null %} {% if showTeamSubmissions or jury %} - {% set summaryColspan = 3 %} + {% set summaryColspan = 2 %} {% if showAffiliationLogos %} {% set summaryColspan = summaryColspan + 1 %} {% endif %} - {% if not enable_ranking %} - {% set summaryColspan = summaryColspan - 1 %} + {% if enable_ranking %} + {% set summaryColspan = summaryColspan + 1 %} + {% if medalsEnabled %} + {% set summaryColspan = summaryColspan + 1 %} + {% endif %} {% endif %} Summary {% if enable_ranking %} diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index e3eaad7b22..a2f856ccc7 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -38,6 +38,9 @@ {# output table column groups (for the styles) #} {% if enable_ranking %} + {% if medalsEnabled %} + + {% endif %} {% endif %} {% if showFlags %} @@ -66,7 +69,7 @@ {% if enable_ranking %} - rank + rank {% endif %} team {% if enable_ranking %} @@ -135,10 +138,14 @@ {% endif %} {% if enable_ranking %} + {% if medalsEnabled %} + + {% if medalColor != '' %} + + {% endif %} + + {% endif %} - {% if medalColor != '' %} - - {% endif %} {# Only print rank when score is different from the previous team #} {% if not displayRank %} ? From 28a1ef86d63a6a9c8ce12ca406bb6d3862675612 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 17:38:36 +0000 Subject: [PATCH 2/2] Give the rank some padding --- webapp/public/style_domjudge.css | 4 ++++ webapp/templates/partials/scoreboard_table.html.twig | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/public/style_domjudge.css b/webapp/public/style_domjudge.css index a9c5f89168..7d824d6a71 100644 --- a/webapp/public/style_domjudge.css +++ b/webapp/public/style_domjudge.css @@ -198,6 +198,10 @@ del { .scoreboard td.no-border, .scoreboard th.no-border { border: none; } +.scoreboard td.rank { + padding-left: 0.3em; + padding-right: 0.3em; +} .scoreboard td.score_cell { min-width: 4.2em; border-right: none; diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index a2f856ccc7..0d08d415ed 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -145,7 +145,7 @@ {% endif %} {% endif %} - + {# Only print rank when score is different from the previous team #} {% if not displayRank %} ?