{% extends 'aapayout/base.html' %} {% load i18n %} {% load humanize %} {% load aapayout_filters %} {% block details %}

{{ fleet.name }}

{{ fleet.fleet_commander.username }} | {{ fleet.fleet_time|date:"Y-m-d H:i" }} | {{ fleet.location }}

{% if can_edit %} {% translate "Edit Fleet" %}
{% csrf_token %}
{% endif %}
{% translate "Fleet Information" %}
{% translate "Status" %}: {% if fleet.status == 'draft' %} {{ fleet.get_status_display }} {% elif fleet.status == 'active' %} {{ fleet.get_status_display }} {% elif fleet.status == 'completed' %} {{ fleet.get_status_display }} {% elif fleet.status == 'paid' %} {{ fleet.get_status_display }} {% endif %}
{% translate "Doctrine" %}: {{ fleet.doctrine|default:"—" }}
{% translate "Participants" %}: {{ participants.count }}
{% translate "Total Loot Value" %}: {{ fleet.get_total_loot_value|isk_format_full }}
{% translate "Created" %}: {{ fleet.created_at|date:"Y-m-d H:i" }}
{% if fleet.notes %}
{% translate "Notes" %}:

{{ fleet.notes|linebreaks }}

{% endif %}
{% translate "Loot Summary" %}
{% if loot_pools %}
    {% for pool in loot_pools %}
  • {{ pool.name }}
    {% if pool.status == 'draft' %} {{ pool.get_status_display }} {% elif pool.status == 'valuing' %} {{ pool.get_status_display }} {% elif pool.status == 'valued' %} {{ pool.get_status_display }} {% elif pool.status == 'approved' %} {{ pool.get_status_display }} {% elif pool.status == 'paid' %} {{ pool.get_status_display }} {% endif %}
    {{ pool.total_value|isk_format_full }}
  • {% endfor %}
{% else %}

{% translate "No loot pools yet" %}

{% endif %} {% if can_edit %}
{% if not loot_pools %} {% translate "Add Loot Pool" %} {% else %} {% endif %}
{% endif %}
{% translate "Fleet Participants" %}
{% if can_edit %}
{% if esi_status.enabled %} {% if esi_status.can_import %} {# User has everything needed - show enabled import button #}
{% csrf_token %}
{% elif not esi_status.has_scope %} {# User needs to grant ESI access #} {% translate "Grant ESI Access" %} {% else %} {# Show disabled button with explanation #} {% endif %} {% endif %} {% translate "Add Manual" %}
{% endif %}
{% if can_edit and esi_status.enabled and esi_status.message and not esi_status.can_import %} {# Show explanation message below buttons #} {{ esi_status.message }} {% endif %}
{% if participants %}
{% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% for participant in participants %} {% with main_char_id=participant.main_character.id|default:participant.character.id %} {% with is_main=participant.main_character.id == participant.character.id or not participant.main_character %} {% with payout=existing_payouts|default_if_none:None %} {% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% endwith %} {% endwith %} {% endwith %} {% endfor %}
{% translate "Character" %} {% translate "Main Character" %} {% translate "Role" %} {% translate "Joined At" %} {% translate "Status" %}{% translate "Payout Amount" %} {% translate "Scout" %} {% translate "Exclude" %} {% translate "Actions" %}
{{ participant.character.character_name }} {% if participant.main_character %} {{ participant.main_character.name }} {% if participant.main_character.id != participant.character.id %} {% endif %} {% else %} {% endif %} {{ participant.get_role_display }} {{ participant.joined_at|date:"Y-m-d H:i" }} {% if participant.is_active %} {% translate "Active" %} {% else %} {% translate "Left" %} {% endif %} {% if is_main and main_char_id in payout_map %} {{ payout_map|get_item:main_char_id|isk_format_full }} {% if participant.is_scout %} {% translate "Scout" %} {% endif %} {% elif not is_main %} {% translate "(grouped with main)" %} {% else %} {% endif %} {% if is_main and main_char_id in existing_payouts %} {% with payout_obj=existing_payouts|get_item:main_char_id %} {% if payout_obj.status == 'pending' %}
{% elif payout_obj.status == 'paid' %} {% translate "Paid" %} {% endif %} {% endwith %} {% else %}
{% csrf_token %}
{% endif %}
{% else %}

{% translate "No participants added yet" %}

{% if can_edit %} {% translate "Add First Participant" %} {% endif %} {% endif %}
{% endblock %}