{# il2ks-template: templates/il2ks/sorties/parts/ammo.html v1 - copy this line along when you override #}
{% load i18n il2ks %}{% comment %}
Ammunition (FR-ING-24, doc 13): loaded, left, used per kind, and hits per ammunition type. "Used" is the dash when
it is unknown, with the reason under the table. Context: detail.ammo (sortie_view.AmmoTable: rows, hits,
used_unknown); rows are AmmoRow (label, loaded, left, used, note), hits are HitRow (name, given, received).
FR-WEB-18: ammunition is shown by its plain name (".50 BMG API", the real designation as a tooltip); bombs, rockets
and napalm are listed apart (detail.ammo.ordnance: OrdnanceView). The damage attributed to each ammunition is not
shown (OQ-52); only hits and the ordnance counts are.
{% endcomment %}{% if detail.ammo.rows or detail.ammo.hits or detail.ammo.ordnance %}
{% translate "Ammunition" %}
{% if detail.ammo.rows %}
| {% translate "Type" %} |
{# Translators: ammunition table columns, rounds loaded at take-off / rounds still left at the end / rounds fired (used) #}
{% translate "Loaded" %} | {% translate "Left" %} | {% col_th _("Used") numeric=True hint="ammo_used" %}
{% for row in detail.ammo.rows %}
| {{ row.label }} |
{{ row.loaded }} |
{{ row.left }} |
{% if row.estimated %}{{ row.used }}{% elif row.note %}{{ row.used }}{% else %}{{ row.used }}{% endif %} |
{% endfor %}
{% if detail.ammo.used_unknown %}
{% if detail.ammo.used_unknown == "resupplied" %}{% translate "Used is unknown: the aircraft was resupplied during the sortie." %}
{% elif detail.ammo.used_unknown == "no_end_record" %}{% translate "Used is unknown: the log has no end-of-sortie ammunition record, for example after a disconnect." %}
{% elif detail.ammo.used_unknown == "after_loss" %}{% translate "Used is unknown for guns, and only estimated (~, everything loaded) for bombs and rockets that were released: the ammunition left was recorded after the aircraft was lost." %}
{% else %}{% translate "Used is unknown: the ammunition left is not reliable." %}{% endif %}
{% endif %}
{% endif %}
{% if detail.ammo.hits %}
| {% translate "Ammunition hit by or with" %} | {% col_th _("Hits dealt") numeric=True %}{% col_th _("Hits taken") numeric=True %}
{% for row in detail.ammo.hits %}
| {% if row.designation %}{{ row.name }}{% else %}{{ row.name }}{% endif %} | {{ row.given }} | {{ row.received }} |
{% endfor %}
{% translate "Hits needed to destroy each aircraft type" %}
{% endif %}
{% if detail.ammo.ordnance %}
{% blocktranslate with n=detail.ammo.ordnance|length|num asvar ordnance_hint %}{{ n }} types{% endblocktranslate %}
{% accordion _("Bombs, rockets and napalm") ordnance_hint open=True %}
| {% translate "Ordnance" %} | {% col_th _("Released") numeric=True %}{% col_th _("Targets damaged") numeric=True hint="ord_targets" %}{% translate "Kills" %} | {% col_th _("Direct hits") numeric=True hint="ord_direct" %}
{% for row in detail.ammo.ordnance %}
| {{ row.name }} | {{ row.released }} | {{ row.targets_damaged }} | {{ row.kills }} | {{ row.direct }} |
{% endfor %}
{% endaccordion %}
{% endif %}
{% endif %}