Skip to content

Commit f6e4e11

Browse files
Fix displaying medals on scoreboard
They sometimes were displaying next to each other. By using two table cells, this will never happen.
1 parent 8e0cb13 commit f6e4e11

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

webapp/templates/partials/scoreboard_summary.html.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{% if limitToTeamIds is null %}
22
{% if showTeamSubmissions or jury %}
33
<tr style="border-top: 2px solid black;">
4-
{% set summaryColspan = 3 %}
4+
{% set summaryColspan = 2 %}
55
{% if showAffiliationLogos %}
66
{% set summaryColspan = summaryColspan + 1 %}
77
{% endif %}
8-
{% if not enable_ranking %}
9-
{% set summaryColspan = summaryColspan - 1 %}
8+
{% if enable_ranking %}
9+
{% set summaryColspan = summaryColspan + 1 %}
10+
{% if medalsEnabled %}
11+
{% set summaryColspan = summaryColspan + 1 %}
12+
{% endif %}
1013
{% endif %}
1114
<td class="scoresummary" title="Summary" colspan="{{ summaryColspan }}">Summary</td>
1215
{% if enable_ranking %}

webapp/templates/partials/scoreboard_table.html.twig

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
{# output table column groups (for the styles) #}
3939
<colgroup>
4040
{% if enable_ranking %}
41+
{% if medalsEnabled %}
42+
<col id="scorerank"/>
43+
{% endif %}
4144
<col id="scorerank"/>
4245
{% endif %}
4346
{% if showFlags %}
@@ -66,7 +69,7 @@
6669
<thead>
6770
<tr class="scoreheader" data-static="{{ static }}">
6871
{% if enable_ranking %}
69-
<th title="rank" scope="col">rank</th>
72+
<th title="rank" scope="col" {% if medalsEnabled %}colspan="2"{% endif %}>rank</th>
7073
{% endif %}
7174
<th title="team name" scope="col" colspan="{{ teamColspan }}">team</th>
7275
{% if enable_ranking %}
@@ -135,10 +138,14 @@
135138
{% endif %}
136139
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}">
137140
{% if enable_ranking %}
141+
{% if medalsEnabled %}
142+
<td class="no-border">
143+
{% if medalColor != '' %}
144+
<i class="fa fa-medal {{medalColor}}" style="font-size: 1.5rem;"></i>
145+
{% endif %}
146+
</td>
147+
{% endif %}
138148
<td class="scorepl">
139-
{% if medalColor != '' %}
140-
<i class="fa fa-medal {{medalColor}}" style="font-size: 1.5rem;"></i>
141-
{% endif %}
142149
{# Only print rank when score is different from the previous team #}
143150
{% if not displayRank %}
144151
?

0 commit comments

Comments
 (0)