Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix displaying medals on scoreboard #2919

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions webapp/public/style_domjudge.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions webapp/templates/partials/scoreboard_summary.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% if limitToTeamIds is null %}
{% if showTeamSubmissions or jury %}
<tr style="border-top: 2px solid black;">
{% 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 %}
<td class="scoresummary" title="Summary" colspan="{{ summaryColspan }}">Summary</td>
{% if enable_ranking %}
Expand Down
17 changes: 12 additions & 5 deletions webapp/templates/partials/scoreboard_table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
{# output table column groups (for the styles) #}
<colgroup>
{% if enable_ranking %}
{% if medalsEnabled %}
<col id="scorerank"/>
{% endif %}
<col id="scorerank"/>
{% endif %}
{% if showFlags %}
Expand Down Expand Up @@ -66,7 +69,7 @@
<thead>
<tr class="scoreheader" data-static="{{ static }}">
{% if enable_ranking %}
<th title="rank" scope="col">rank</th>
<th title="rank" scope="col" {% if medalsEnabled %}colspan="2"{% endif %}>rank</th>
{% endif %}
<th title="team name" scope="col" colspan="{{ teamColspan }}">team</th>
{% if enable_ranking %}
Expand Down Expand Up @@ -135,10 +138,14 @@
{% endif %}
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}">
{% if enable_ranking %}
<td class="scorepl">
{% if medalColor != '' %}
<i class="fa fa-medal {{medalColor}}" style="font-size: 1.5rem;"></i>
{% endif %}
{% if medalsEnabled %}
<td class="no-border">
{% if medalColor != '' %}
<i class="fa fa-medal {{medalColor}}" style="font-size: 1.5rem;"></i>
{% endif %}
</td>
{% endif %}
<td class="scorepl rank">
{# Only print rank when score is different from the previous team #}
{% if not displayRank %}
?
Expand Down
Loading