{% extends "fortunaisk/base.html" %} {% load i18n humanize fortunaisk_tags static %} {% block page_title %} {% trans "Lottery Detail" %} {% endblock page_title %} {% block details %}

{% trans "Lottery Detail" %}: {{ lottery.lottery_reference }}

{% if perms.fortunaisk.terminate_lottery and lottery.status == 'active' %}
{% csrf_token %}
{% endif %} {% trans "View Participants" %}
  • {% trans "Status" %}: {% if lottery.status == "active" %} {% trans "Active" %} {% elif lottery.status == "completed" %} {% trans "Completed" %} {% elif lottery.status == "cancelled" %} {% trans "Cancelled" %} {% else %} {{ lottery.status }} {% endif %}
  • {% trans "Ticket Price (ISK)" %}: {{ lottery.ticket_price|floatformat:2 }}
  • {% trans "Total Pot (ISK)" %}: {{ lottery.total_pot|intcomma }}
  • {% trans "Winner Count" %}: {{ lottery.winner_count }}
  • {% trans "Max Tickets per User" %}: {% if lottery.max_tickets_per_user %} {{ lottery.max_tickets_per_user }} {% else %} {% trans "Unlimited" %} {% endif %}
  • {% trans "Start Date" %}: {{ lottery.start_date|date:"Y-m-d H:i" }}
  • {% trans "End Date" %}: {{ lottery.end_date|date:"Y-m-d H:i" }}
  • {% trans "Payment Receiver" %}: {% if lottery.payment_receiver %} {{ lottery.payment_receiver }} {% else %} {% trans "Unknown" %} {% endif %}
  • {% trans "Duration" %}: {{ lottery.duration_value }} {{ lottery.get_duration_unit_display }}
  • {% trans "Winners Distribution" %}: {% for percentage in lottery.winners_distribution %} {{ percentage }}{% if not forloop.last %}, {% endif %} {% endfor %}
  • {% trans "Number of Participants" %}: {{ lottery.ticket_purchases.count }}

{% trans "Winners" %}

{% if winners %}
{% for winner in winners %} {% endfor %}
{% trans "Lottery Reference" %} {% trans "User" %} {% trans "Character" %} {% trans "Prize Amount (ISK)" %} {% trans "Won At" %} {% trans "Distributed" %} {% trans "Actions" %}
{{ winner.ticket.lottery.lottery_reference }} {{ winner.ticket.user.username }} {% if winner.character %} {{ winner.character }} {% else %} N/A {% endif %} {{ winner.prize_amount|floatformat:2 }} {{ winner.won_at|date:"Y-m-d H:i" }} {% if winner.distributed %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %} {% if not winner.distributed %}
{% csrf_token %}
{% else %} {% trans "Distributed" %} {% endif %}
{% else %}
{% trans "No winners recorded yet." %}
{% endif %}
{% endblock details %}