{# il2ks-template: templates/il2ks/players/detail_aircraft.html v1 - copy this line along when you override #} {% load i18n il2ks il2ks_boards %}{% comment %} detail_aircraft.html: the per-aircraft table from PlayerAircraft, sortable with ?sort= (a whitelist in the view). It is the page's one results_region, so the sort links swap just this table with htmx. Each row links to the player's sortie list filtered to that aircraft (?aircraft=). Context: player, aircraft (PlayerAircraft or PlayerTourAircraft rows), sort, tour (the chosen Tour or None). {% endcomment %}

{% translate "By aircraft" %}

{% if role == "all" %}{% player_builds player tour as builds %}{% endif %} {% results_region %}
{% sort_th "aircraft" _("Aircraft") %} {% sort_th "sorties" _("Sorties") numeric=True %} {% sort_th "flight_time_s" _("Flight time") numeric=True %} {% sort_th "kills_air" _("Air kills") numeric=True %} {% sort_th "kills_ground" _("Ground kills") numeric=True %} {% sort_th "deaths" _("Deaths") numeric=True %} {% col_th _("K/D") numeric=True hint="kd" %} {% col_th _("K/L") numeric=True hint="kl" %} {% for row in aircraft %} {% if role == "all" %}{% with build=builds|build_of:row.aircraft_id %}{% include "il2ks/players/detail_aircraft_build.html" %}{% endwith %}{% endif %} {% empty %} {% empty_row 8 %} {% endfor %}
{% aircraft_icon row.aircraft "aircraft-table__icon" %} {{ row.aircraft|object_name }} {{ row.sorties|num }} {{ row.flight_time_s|duration }} {{ row.kills_air|num }} {{ row.kills_ground|num }} {{ row.deaths|num }} {{ row.kills_air|ratio:row.deaths }} {{ row.kills_air|ratio:row.planes_lost }}
{% endresults_region %}