{# il2ks-template: templates/il2ks/players/detail.html v1 - copy this line along when you override #} {% extends "il2ks/base.html" %}{% load i18n static il2ks il2ks_achievements %}{% comment %} Player profile (FR-WEB-4). View: il2ks.web.views.players.player_detail. Built from small partials in players/, in this order: detail_header, tour select, detail_nav (in-page links), detail_tiles (general), detail_shame (hall of shame), detail_recent (latest 5 sorties + "View all sorties"), detail_air_section (air-to-air: detail_air_tiles, detail_ratios, detail_scores, detail_air_split, detail_type_killboard, detail_killboard), detail_ground_section (air-to-ground: detail_ground_tiles, detail_ground, detail_ground_scores), detail_overall (detail_streaks, detail_aircraft, detail_pve, detail_totals, detail_charts). Role (`?role=air_superiority|attack`, {% role_toggle %} under the tour select, only for a pilot with sorties in the scope): stats, aircraft, recent and the parts count only that role's sorties. The air and ground parts swap places when `ground_first` (attack role, or a pilot who flies mostly attack). Not role-scoped, so left out in a role view: medals and ribbons, the per-aircraft favourite loadouts and the per-tour charts; the ironman block and the killboards stay all-role (the latter with a note); Elo is hidden for attack (`show_elo`). An empty air or ground part collapses to one line (`air_active` / `ground_active`). The streaks and killboard follow the selected tour. Tours (TD-26): `?tour=` shows the counters of that tour (`stats` is the PlayerTour row, `aircraft` the per-tour rows, `recent` that tour's sorties). No `?tour` = the current tour (newest, queries.tours), `?tour=all` = all time (`stats` is the Player). {% tour_select %} sits in the header, right of the name. Context: air_active, ground_active, player, stats (Player or PlayerTour, None when the tour has no sortie of theirs), tour, tours, names (PlayerName rows, newest first), sort (aircraft table sort, resolved), pve_kills / pve_losses (of `stats`), aircraft (PlayerAircraft / PlayerTourAircraft rows with .aircraft), survived (sorties without a death), ground (GroundRow list), gunner_only, recent (PlayerSortie rows with .mission and .aircraft), tour_query, crumbs, page_title. `medal_set` (medals, ribbons, hall-of-shame ribbons of the selected scope; two reads) is set here for detail_shame and detail_achievements. Blocks of this page: content. A player without a counted sortie gets a notice instead of empty tables. {% endcomment %} {% block head %}{% endblock %} {% block content %} {% breadcrumbs crumbs %} {% include "il2ks/players/detail_header.html" %} {% if has_sorties %}{% role_toggle role %}{% endif %} {% if stats.sorties %} {% include "il2ks/players/detail_nav.html" %} {% include "il2ks/players/detail_tiles.html" %} {% if role == "all" %}{% player_medals player tour as medal_set %}{% endif %} {% include "il2ks/players/detail_shame.html" %} {% if role == "all" %}{% include "il2ks/players/detail_achievements.html" %}{% endif %} {% include "il2ks/players/detail_recent.html" %} {% if ground_first %} {% include "il2ks/players/detail_ground_section.html" %} {% include "il2ks/players/detail_air_section.html" %} {% else %} {% include "il2ks/players/detail_air_section.html" %} {% include "il2ks/players/detail_ground_section.html" %} {% endif %} {% include "il2ks/players/detail_overall.html" %} {% elif has_sorties %} {% notice "info" _("No sorties in this role") %}{% translate "This player flew no sorties of the selected combat role in the selected tour. Choose another role above." %}{% endnotice %} {% else %} {% if gunner_only %} {% notice "info" _("Gunner only") %}{% translate "This player flies as a gunner only. Gunner stats come later." %}{% endnotice %} {% elif absence %} {% blocktranslate asvar absent_message with name=player.current_name tour=absence.tour|tour_title %}{{ name }} did not fly in {{ tour }}.{% endblocktranslate %}{% tour_absent absence absent_message %} {% elif tour %} {% notice "info" _("No sorties in this tour") %}{% translate "No pilot sorties are counted for this player in the selected tour." %} {% flavor "tour_empty" tour.pk %}{% endnotice %} {% else %} {% notice "info" _("No sorties yet") %}{% translate "No pilot sorties are counted for this player yet." %}{% endnotice %} {% endif %} {% if recent or not absence %}{% include "il2ks/players/detail_recent.html" %}{% endif %} {% endif %} {% endblock %}