{% extends "site_base.html" %} {% load registrasion_tags %} {% load lca2018_tags %} {% load staticfiles %} {% block head_title %}Raffle Winners{% endblock %} {% block page_title %}Raffle Winners{% endblock %} {% block content %} {% for raffle in raffles %} {% if raffle.hidden %} {% else %}

{{ raffle }}

{% for prize in raffle.prizes.all %}
{{ prize }}
{% if prize.winning_ticket %} {% with prize.winning_ticket as winner %} {# this should be attendee name #} {% with winner.lineitem.invoice.user.attendee.attendeeprofilebase as profile %}

Winning ticket {{ winner.ticket }}, {{ profile.attendee_name }}
Drawn by {{ winner.draw.drawn_by }}, {{ winner.draw.drawn_time}}

{% endwith %}
{% csrf_token %} {# This should have a `reason` field that can be passed through to the Audit log #}

Re-draw {{ prize }}

{% endwith %} {% else %} Not drawn {% endif %}
{% endfor %}
{% if raffle.is_open %}
{% csrf_token %}
{% endif %} {% if not forloop.last %}
{% endif %} {% endif %} {% endfor %} {% endblock %}