{% extends "layout.html" %} {% import "icons.html" as icons %} {% import "card.html" as card %} {% block content %}
{% if divisions | length > 1 %}
{% call card.root() %} {% call card.header() %} {% call card.title() %} Division {% endcall %} {% call card.description() %} Select the division for the scoreboard {% endcall %} {% endcall %} {% call card.content() %}
{% for division_id, division in divisions | items %}
{{ division.name }}
{% if selected_division_id == division_id %}
{% endif %}
{% endfor %}
{% if user.is_admin %}
{% endif %} {% endcall %} {% endcall %}
{% endif %}
{% call card.root() %} {% call card.header() %} {% call card.title() %} Leaderboard {% endcall %} {% call card.description() %} Current standing of all teams in the division {% endcall %} {% endcall %} {% call card.content() %} {% if leaderboard.entries | length > 0 %}
{% for entry in leaderboard.entries %} {% endfor %}
{{ entry.rank }} {{ entry.team_name }} {{ entry.score }} points
{% if leaderboard.num_pages > 1 %}
{% for i in range(leaderboard.num_pages) %} {% if i == 0 and page_num != 0 %} 1 {% elif i != page_num %} {{ i + 1 }} {% else %} {{ i + 1 }} {% endif %} {% endfor %}
{% endif %} {% else %}

No teams in this division have solved a challenge yet!

{% endif %} {% endcall %} {% endcall %}
{% endblock %}