{% 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" }}

{% if can_edit %}
{% csrf_token %}
{% endif %}
{% translate "Fleet Information" %}
{% csrf_token %}
{% translate "Fleet Name" %}: {% if can_edit %} {% else %} {{ fleet.name }} {% endif %}
{% translate "Fleet Time" %}: {% if can_edit %} {% else %} {{ fleet.fleet_time|date:"Y-m-d H:i" }} {% endif %}
{% translate "Battle Report" %}: {% if can_edit %} {% else %} {% if fleet.battle_report %} {{ fleet.battle_report }} {% else %} {% endif %} {% endif %}
{% 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 "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" }}
{% translate "Notes" %}: {% if can_edit %} {% else %} {% if fleet.notes %}

{{ fleet.notes|linebreaks }}

{% else %}

{% endif %} {% endif %}
{% if can_edit %}
{% endif %}
{% translate "Loot" %}
{% if loot_pools %} {% with loot_pool=loot_pools.first %}

{{ loot_pool.items.count }} {% translate "items" %} {% translate "valued at" %} {{ loot_pool.total_value|isk_format_full }}

{% translate "View Details" %} {% if can_edit %} {% translate "Reappraise" %} {% if loot_pool.status == 'approved' or loot_pool.status == 'valued' %}
{% csrf_token %}
{% endif %} {% endif %}
{% endwith %} {% else %}

{% translate "No loot added yet" %}

{% if can_edit %} {% translate "Add Loot" %} {% if participants.count == 0 %} {% translate "Tip: Payouts will be calculated automatically whether you add participants before or after loot" %} {% endif %} {% endif %} {% endif %}
{% if loot_pools %} {% with loot_pool=loot_pools.first %} {% if loot_pool.payouts.count > 0 %}
{% translate "Paying Out ISK" %}

{% translate "To pay participants, use the action buttons in the Participants table below:" %}

  • {% translate "Copy Name" %}: {% translate "Copy character name to clipboard" %}
  • {% translate "Copy Amount" %}: {% translate "Copy ISK amount (whole number, no decimals)" %}
  • {% translate "Open Window" %}: {% translate "Open character window in EVE client (requires ESI)" %}
  • {% translate "Mark Paid" %}: {% translate "Mark the payout as complete after transferring ISK" %}

{% translate "Note:" %} {% translate "Payouts are automatically recalculated when you add, remove, or change participants." %}

{% elif loot_pool.payouts.count == 0 and participants.count == 0 %}
{% translate "No Payouts Generated" %}

{% translate "Add participants to the fleet below to generate payouts. Payouts will be calculated automatically." %}

{% endif %} {% endwith %} {% endif %}
{% translate "Fleet Participants" %}
{% if can_edit %}
{% if esi_status.enabled %} {% if not esi_status.fc_character_id %} {# No FC character selected #} {% elif not esi_status.has_scope %} {# FC character selected but no ESI token #} {% translate "Grant ESI Access" %} {% elif esi_status.can_import %} {# Everything ready - show enabled import button #}
{% csrf_token %}
{% else %} {# Fallback - show disabled button #} {% endif %} {% endif %}
{% endif %}
{% if can_edit and esi_status.enabled %} {# Show helpful hints based on current state #} {% if not esi_status.fc_character_id %} {% translate "Select your FC character from the dropdown in the top navigation bar to enable ESI fleet import" %} {% elif not esi_status.has_scope %} {% translate "Click 'Grant ESI Access' to add ESI token with fleet read permissions for" %} {{ esi_status.fc_character_name }} {% elif esi_status.can_import %} {% translate "Join a fleet in EVE Online, then click 'Import ESI Fleet' to automatically add all members" %} {% endif %} {% endif %}
{% if participants %}
{% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% for group in participant_groups.values %} {% with main_char=group.main_character main_char_id=group.main_character.id first_participant=group.participants.0 %} {% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% endwith %} {% endfor %}
{% translate "Main Character" %} {% translate "Characters in Fleet" %} {% translate "Status" %}{% translate "Payout Amount" %} {% translate "Scout" %} {% translate "Exclude" %} {% translate "Actions" %}
{{ main_char.name }} {% if group.participants|length > 1 %} {{ group.participants|length }} {% translate "characters" %} {% for p in group.participants %} {{ p.character.name }}{% if not forloop.last %}, {% endif %} {% endfor %} {% else %} {{ first_participant.character.name }} {% endif %} {% if first_participant.is_active %} {% translate "Active" %} {% else %} {% translate "Left" %} {% endif %} {% if main_char_id in payout_map %} {{ payout_map|get_item:main_char_id|isk_format_full }} {% if group.is_scout %} {% translate "Scout" %} {% endif %} {% else %} {% endif %} {% if 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 %} {% endif %} {% endif %}
{% if can_edit %} {% endif %}
{% endblock %}