Skip to content

Fix pre-contest display when teams have no affiliations #2997

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

Merged
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
3 changes: 2 additions & 1 deletion webapp/src/Service/ScoreboardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,8 @@ public function getGroupedAffiliations(Contest $contest): array
->leftJoin('t.affiliation', 'affil')
->andWhere('cat.visible = 1')
->orderBy('cat.name')
->addOrderBy('affil.name');
->addOrderBy('affil.name')
->addOrderBy('t.name');

if (!$contest->isOpenToAllTeams()) {
$queryBuilder
Expand Down
4 changes: 2 additions & 2 deletions webapp/templates/partials/scoreboard.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
<div class="card-body">
<ul class="list-group list-group-flush">
{% for affiliation in affiliations %}
{% if affiliation.color is null %}
{% if affiliation.color is not defined or affiliation.color is null %}
{% set color = "#FFFFFF" %}
{% set colorClass = "_FFFFFF" %}
{% else %}
{% set colorClass = affiliation.color | replace({"#": "_"}) %}
{% endif %}
<li class="list-group-item cl{{ colorClass }}">
{% if showFlags %}
{% if showFlags and affiliation.country is defined %}
{{ affiliation.country|countryFlag }}
{% endif %}
{% set affiliationLogo = affiliation.id | assetPath('affiliation') %}
Expand Down
Loading