{# il2ks-template: templates/il2ks/sorties/parts/header.html v1 - copy this line along when you override #} {% load i18n il2ks il2ks_sorties %}{% comment %} Report header: who flew what, for which side, in which mission, and the result at a glance (the part that fits a Discord screenshot). Context: sortie (player, mission, aircraft), detail, sortie_marks (badges after the air and ground kills). A running mission's notice sits between the header and the tiles. {% endcomment %}
{% aircraft_icon sortie.aircraft "sortie-head__icon" %}

{{ sortie.name_at_time }}

{% if sortie.role == "gunner" %}{{ sortie.aircraft|object_name }}{% else %}{{ sortie.aircraft|object_name }}{% endif %}{% if sortie.payload_name %} · {{ sortie.payload_name }}{% endif %}

{% coalition_badge sortie.country %} {% if sortie.role == "gunner" %}{% badge _("Gunner") "purple" %}{% else %}{% badge _("Pilot") "grey" %}{% if sortie.combat_role %} {% role_badge sortie.combat_role %}{% endif %}{% endif %} {% outcome_badge sortie.outcome %} {% if detail.has_ram %}{% if detail.ram_with %}{% blocktranslate with enemy=detail.ram_with asvar ram_tip %}Collided with {{ enemy }}: counts as a kill for both pilots. Ram detection can occasionally be wrong.{% endblocktranslate %}{% else %}{% translate "Collided with another aircraft: counts as a kill for both pilots. Ram detection can occasionally be wrong." as ram_tip %}{% endif %}{% badge _("Ram") "orange" title=ram_tip icon="event/ram" %}{% endif %} {% if sortie.mission.is_live %}{% badge _("Live") "green" title=_("This mission is still running.") %}{% endif %} {% if sortie.taxi_accident %}{% badge _("Taxi accident") "orange" icon="stat/taxi-accidents" %}{% endif %} {% if sortie.strafed_on_ground %}{% badge _("Strafed on the ground") "orange" icon="stat/strafed" %}{% endif %}

{{ sortie.mission.mission_file|mission_name }} {% blocktranslate with when=sortie.spawned_at|local_time %}spawned {{ when }}{% endblocktranslate %} {% if sortie.name_at_time != sortie.player.current_name %} {% blocktranslate with name=sortie.player.current_name %}now playing as {{ name }}{% endblocktranslate %}{% endif %}

{% if sortie.mission.is_live %}{% notice "changing" title=_("Mission still running") %}{% translate "The numbers may still change until it ends." %}{% endnotice %}{% endif %}
{% sortie_mark sortie_marks "air_kills" as air_mark %}{% sortie_mark sortie_marks "ground_kills" as ground_mark %} {% stat_tile sortie.kills_air|num _("Air kills") icon="stat/air-kills" mark=air_mark %} {% stat_tile sortie.kills_ground|num _("Ground kills") icon="stat/ground-kills" mark=ground_mark %} {% blocktranslate with air=sortie.assists_air|num ground=sortie.assists_ground|num asvar sub_assists %}{{ air }} air, {{ ground }} ground{% endblocktranslate %} {% stat_tile sortie.assists|num _("Assists") sub=sub_assists icon="stat/assists" %} {% stat_tile sortie.flight_time_s|duration _("Flight time") icon="stat/flight-time" %} {% if sortie.role == "pilot" %} {% if sortie.rounds_fired is not None %} {% blocktranslate with air=sortie.gun_hits_air|num ground=sortie.gun_hits_ground|num rounds=sortie.rounds_fired|num asvar sub_accuracy %}{{ air }} on aircraft, {{ ground }} on the ground, of {{ rounds }} rounds{% endblocktranslate %} {% stat_tile sortie.gun_hits_air|add:sortie.gun_hits_ground|accuracy:sortie.rounds_fired _("Gun accuracy") sub=sub_accuracy icon="stat/accuracy" %} {% elif sortie.gun_hits_air or sortie.gun_hits_ground %} {% blocktranslate with air=sortie.gun_hits_air|num ground=sortie.gun_hits_ground|num asvar sub_hits %}{{ air }} on aircraft, {{ ground }} on the ground; rounds fired unknown{% endblocktranslate %} {% stat_tile sortie.gun_hits_air|add:sortie.gun_hits_ground|num _("Gun hits") sub=sub_hits %} {% endif %} {% endif %}