{# il2ks-template: templates/il2ks/leaderboards/table.html v1 - copy this line along when you override #} {% load i18n il2ks %}{% comment %} table.html: the table of a leaderboard. Context: board, sort, page_obj (Page of BoardRow: rank, player, stats, per_hour). Per-hour boards: ground-hour, interception, tank-busting. The ironman boards (ironman-all, ironman-air, ironman-ground) list each pilot's best run: `stats` is the PlayerBestStreak row (four fixed columns: pilot, sorties in a row, air kills, ground kills). `stats` is the player's counters for the board (all-time, tour or per aircraft); the columns differ per board. {% endcomment %}
{% sort_th "name" _("Player") %} {% if board.key == "air" %} {% sort_th "score" _("Air score") numeric=True hint="score_air" %} {% sort_th "kills_air" _("Air kills") numeric=True %} {% sort_th "assists" _("Assists") numeric=True hint="assists" %} {% sort_th "deaths" _("Deaths") numeric=True %} {% sort_th "sorties" _("Sorties") numeric=True %} {% elif board.key == "ground" %} {% sort_th "score" _("Ground score") numeric=True hint="score_ground" %} {% sort_th "kills_ground" _("Ground kills") numeric=True %} {% sort_th "attack_sorties" _("Attack sorties") numeric=True hint="attack_sorties" %} {% sort_th "sorties" _("Sorties") numeric=True %} {% elif board.key == "interception" %} {% sort_th "per_hour" _("Kills per hour") numeric=True hint="interception_rate" %} {% sort_th "kills" _("Bombers, attackers and transports shot down") numeric=True hint="interception_kills" %} {% sort_th "flight_time_s" _("Air superiority flight time") numeric=True %} {% sort_th "air_superiority_sorties" _("Air superiority sorties") numeric=True hint="air_superiority_sorties" %} {% elif board.key == "tank-busting" %} {% sort_th "per_hour" _("Tanks per hour") numeric=True hint="tank_rate" %} {% sort_th "tanks" _("Tanks destroyed") numeric=True hint="tanks" %} {% sort_th "time_on_target_s" _("Time on target") numeric=True hint="time_on_target" %} {% sort_th "attack_sorties" _("Attack sorties") numeric=True hint="attack_sorties" %} {% elif board.key == "ground-hour" %} {% sort_th "per_hour" _("Attack proficiency") numeric=True hint="score_per_hour" %} {% sort_th "score" _("Attack ground score") numeric=True %} {% sort_th "time_on_target_s" _("Time on target") numeric=True hint="time_on_target" %} {% sort_th "attack_sorties" _("Attack sorties") numeric=True hint="attack_sorties" %} {% elif board.key == "play-time" %} {% sort_th "flight_time_s" _("Flight time") numeric=True %} {% sort_th "sorties" _("Sorties") numeric=True %} {% elif board.streak_track %} {% sort_th "sorties" _("Sorties in a row") numeric=True hint="streak_sorties" %} {% sort_th "kills_air" _("Air kills") numeric=True hint="streak_kills" %} {% sort_th "kills_ground" _("Ground kills") numeric=True hint="streak_kills_ground_run" %} {% else %} {% sort_th "rating" _("Elo") numeric=True hint="elo" %} {% sort_th "games" _("Encounters") numeric=True hint="elo_games" %} {% sort_th "sorties" _("Sorties") numeric=True %} {% endif %} {% for row in page_obj.object_list %} {% if board.key == "air" %} {% elif board.key == "ground" %} {% elif board.key == "interception" %} {% elif board.key == "tank-busting" %} {% elif board.key == "ground-hour" %} {% elif board.key == "play-time" %} {% elif board.streak_track %} {% elif board.key == "elo-prop" %} {% else %} {% endif %} {% empty %} {% if board.streak_track %}{% empty_row 5 _("No streak yet: no run of consecutive sorties survived.") %}{% else %}{% empty_row 7 _("Nobody qualifies for this board yet.") %}{% endif %} {% endfor %}
#
{{ row.rank|num }} {% if board.streak_track %}{{ row.player.current_name }}{% else %}{{ row.player.current_name }}{% endif %}{{ row.stats.score_air|num:1 }} {{ row.stats.kills_air|num }} {{ row.stats.assists_air|num }} {{ row.stats.deaths|num }} {{ row.stats.sorties|num }}{{ row.stats.score_ground|num:1 }} {{ row.stats.kills_ground|num }} {{ row.stats.attack_sorties|num }} {{ row.stats.sorties|num }}{{ row.per_hour|num:2 }} {{ row.stats.kills_intercept|num }} {{ row.stats.flight_time_air_s|duration }} {{ row.stats.air_superiority_sorties|num }}{{ row.per_hour|num:2 }} {{ row.stats.kills_tank_attack|num }} {{ row.stats.time_on_target_s|duration }} {{ row.stats.attack_sorties|num }}{{ row.per_hour|num:1 }} {{ row.stats.score_ground_attack|num:1 }} {{ row.stats.time_on_target_s|duration }} {{ row.stats.attack_sorties|num }}{{ row.stats.flight_time_s|duration }} {{ row.stats.sorties|num }}{{ row.stats.sorties|num }} {{ row.stats.kills_air|num }} {{ row.stats.kills_ground|num }}{{ row.rating|num }} {{ row.games|num }} {{ row.stats.sorties|num }}{{ row.rating|num }} {{ row.games|num }} {{ row.stats.sorties|num }}