{# il2ks-template: templates/il2ks/leaderboards/home_block.html v1 - copy this line along when you override #} {% load i18n il2ks %}{% comment %} home_block.html: the home page's compact leaderboards (OQ-64, OQ-79): Elo of the jet and prop pools, the skill boards and play time, a 3x2 grid (2 columns on a tablet, 1 on a phone). Context: boards (a list of HomeBoard: .key "elo-jet", "elo-prop", "interception", "ground-hour", "tank-busting" or "play-time", .title, .rows of BoardRow: rank, player, stats, per_hour, rating for the Elo boards), tour (the selected tour or None), tour_query (the links' scope; the Elo boards follow the tour like the others). Links: web:player-detail, web:leaderboard, web:leaderboards. {% endcomment %}

{% translate "Top pilots" %}

{% for board in boards %}

{{ board.title }}

{% if board.key == "ground-hour" %}{% col_th _("Attack proficiency") numeric=True hint="score_per_hour" %}{% elif board.key == "interception" %}{% col_th _("Per hour") numeric=True hint="interception_rate" %}{% elif board.key == "tank-busting" %}{% col_th _("Per hour") numeric=True hint="tank_rate" %}{% elif board.key == "play-time" %}{% col_th _("Flight time") numeric=True %}{% else %}{% col_th _("Elo") numeric=True hint="elo" %}{% endif %} {% for row in board.rows %} {% empty %} {% empty_row 3 _("Nobody qualifies for this board yet.") %} {% endfor %}
# {% translate "Player" %}
{{ row.rank|num }} {{ row.player.current_name }} {% if board.key == "elo-jet" or board.key == "elo-prop" %}{{ row.rating|num }}{% elif board.key == "play-time" %}{{ row.stats.flight_time_s|duration }}{% elif board.key == "interception" or board.key == "tank-busting" %}{{ row.per_hour|num:2 }}{% else %}{{ row.per_hour|num:1 }}{% endif %}
{% endfor %}

{% translate "All leaderboards" %}