{% extends "happenings/event_detail.html" %}

{% block extra_title %}{{ event.name }} giveaways: {% endblock %}

{% block content %}
  <h1>
    <a href="{{ event.get_absolute_url }}">
      {{ event.name }}
    </a> Giveaways
  </h1>
  
  {% if not authenticated_request %}
    {% include "includes/signin_reg.html" %}
    <small class="meta">to enter</small>
  {% endif %}

  {% for giveaway in giveaways|dictsort:"closed" %}
    {% if giveaway.closed %}
      {% render_giveaway_winners giveaway %}
    {% else %}
      {% include "happenings/giveaways/giveaway_form.html" %}
    {% endif %}
  {% endfor %}
{% endblock %}
