Skip to content

Commit 7ff78f5

Browse files
Display badges on mobile scorebaord
1 parent f1b61a8 commit 7ff78f5

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

webapp/templates/partials/scoreboard_table.html.twig

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -535,29 +535,26 @@
535535
{% endif %}
536536
<a {% if extra is not null %}{{ extra | raw }}{% endif %} {% if link is not null %}href="{{ link }}"{% endif %}>
537537
<span class="forceWidth">
538-
{# TODO: how to display badges on mobile scoreboard #}
539-
{% if false %}
540-
{% set hasBadges = score.team.badgeCategories | length > 0 %}
541-
{% for category in score.team.topBadgeCategories %}
542-
{% if scoreboard.bestInCategory(score.team, category, limitToTeamIds) %}
543-
{% set hasBadges = true %}
544-
{% endif %}
545-
{% endfor %}
546-
{% if hasBadges %}<span class="category-badges">{% endif %}
547-
{% for category in score.team.badgeCategories %}
548-
<span class="badge text-bg-warning category-badge">
549-
{{ category.name }}
550-
</span>
551-
{% endfor %}
552-
{% for category in score.team.topBadgeCategories %}
553-
{% if scoreboard.bestInCategory(score.team, category, limitToTeamIds) %}
554-
<span class="badge text-bg-warning category-best">
555-
{{ category.name }}
556-
</span>
557-
{% endif %}
558-
{% endfor %}
559-
{% if hasBadges %}</span>{% endif %}
560-
{% endif %}
538+
{% set hasBadges = score.team.badgeCategories | length > 0 %}
539+
{% for category in score.team.topBadgeCategories %}
540+
{% if scoreboard.bestInCategory(score.team, category, limitToTeamIds) %}
541+
{% set hasBadges = true %}
542+
{% endif %}
543+
{% endfor %}
544+
{% if hasBadges %}<span class="category-badges">{% endif %}
545+
{% for category in score.team.badgeCategories %}
546+
<span class="badge text-bg-warning category-badge">
547+
{{ category.name }}
548+
</span>
549+
{% endfor %}
550+
{% for category in score.team.topBadgeCategories %}
551+
{% if scoreboard.bestInCategory(score.team, category, limitToTeamIds) %}
552+
<span class="badge text-bg-warning category-best">
553+
{{ category.name }}
554+
</span>
555+
{% endif %}
556+
{% endfor %}
557+
{% if hasBadges %}</span>{% endif %}
561558
{{ score.team.effectiveName }}
562559
</span>
563560
{% if showAffiliations %}

0 commit comments

Comments
 (0)