56 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			56 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								{% extends "registrasion/base.html" %}
							 | 
						||
| 
								 | 
							
								{% load registrasion_tags %}
							 | 
						||
| 
								 | 
							
								{% load lca2018_tags %}
							 | 
						||
| 
								 | 
							
								{% load staticfiles %}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% block header_title %}{% conference_name %}{% endblock %}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% block proposals_body %}
							 | 
						||
| 
								 | 
							
								<h1 class="mb-5">Raffle Winners</h1>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% for raffle in raffles %}
							 | 
						||
| 
								 | 
							
								<h2 class="mt-5">{{ raffle }}</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<dl class="row my-4">
							 | 
						||
| 
								 | 
							
								  {% for prize in raffle.prizes.all %}
							 | 
						||
| 
								 | 
							
								  <dt class="col-sm-3 text-truncate">{{ prize }}</dt>
							 | 
						||
| 
								 | 
							
								  <dd class="col-sm-9">
							 | 
						||
| 
								 | 
							
								    {% if prize.winning_ticket %}
							 | 
						||
| 
								 | 
							
								    {% with prize.winning_ticket as winner %}
							 | 
						||
| 
								 | 
							
								    {# this should be attendee name #}
							 | 
						||
| 
								 | 
							
								    <p><strong>Winning ticket {{ winner.ticket }}, {{ winner.lineitem.invoice.user }}</strong><br />
							 | 
						||
| 
								 | 
							
								      Drawn by {{ winner.draw.drawn_by }}, {{ winner.draw.drawn_time}}
							 | 
						||
| 
								 | 
							
								    </p>
							 | 
						||
| 
								 | 
							
								    <div class="alert alert-danger">
							 | 
						||
| 
								 | 
							
								      <form method="POST" action="{% url 'raffle-redraw' winner.id %}">
							 | 
						||
| 
								 | 
							
								        {% csrf_token %}
							 | 
						||
| 
								 | 
							
								        {# This should have a `reason` field that can be passed through to the Audit log #}
							 | 
						||
| 
								 | 
							
								        <p>
							 | 
						||
| 
								 | 
							
								          Re-draw <em>{{ prize }}</em>
							 | 
						||
| 
								 | 
							
								          <button type="submit" class="btn btn-danger float-right">Re-draw</button>
							 | 
						||
| 
								 | 
							
								        </p>
							 | 
						||
| 
								 | 
							
								        <div class="clearfix"></div>
							 | 
						||
| 
								 | 
							
								      </form>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								    {% endwith %}
							 | 
						||
| 
								 | 
							
								    {% else %}
							 | 
						||
| 
								 | 
							
								    Not drawn
							 | 
						||
| 
								 | 
							
								    {% endif %}
							 | 
						||
| 
								 | 
							
								  </dd>
							 | 
						||
| 
								 | 
							
								  {% endfor %}
							 | 
						||
| 
								 | 
							
								</dl>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% if raffle.is_open %}
							 | 
						||
| 
								 | 
							
								<form method="POST" action="{% url 'raffle-draw' raffle_id=raffle.id %}">
							 | 
						||
| 
								 | 
							
								    {% csrf_token %}
							 | 
						||
| 
								 | 
							
								    <p class="text-center">
							 | 
						||
| 
								 | 
							
								      <button type="submit" class="btn btn-success">Draw tickets</button>
							 | 
						||
| 
								 | 
							
								    </p>
							 | 
						||
| 
								 | 
							
								    <div class="clearfix"></div>
							 | 
						||
| 
								 | 
							
								  </form>
							 | 
						||
| 
								 | 
							
								{% endif %}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% if not forloop.last %}<hr>{% endif %}
							 | 
						||
| 
								 | 
							
								{% endfor %}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{% endblock %}
							 |