{% extends "base_title.html" %}

{% block realcontent %}
  <h2>Places disponibles immédiatement</h2>
  {% if spectacles %}
    <table class="table table-striped stupidtable" id="bda-shotgun">
        <thead>
          <tr>
            <th data-sort="string">Titre</th>
            <th data-sort="int">Date</th>
            <th data-sort="string">Lieu</th>
            <th data-sort="int">Prix</th>
            <th></th>
          </tr>
        </thead>
        <tbody>
          {% for spectacle in spectacles %}
          <tr>
            {% include "bda/forms/spectacle_label_table.html" with spectacle=spectacle %}
            <td class="button"><a role="button" class="btn btn-primary" href="{% url 'bda-revente-buy' spectacle.id %}">Racheter</a>
          </tr>
          {% endfor %}
        </tbody>
      </table>
  {% else %}
    <p> Pas de places disponibles immédiatement, désolé !</p>
  {% endif %}

{% endblock %}
