{% extends "repapp/base.html" %}
{% block title %}
  - Repair-Cafés
{% endblock title %}
{% block page_title %}
  Anmeldung
{% endblock page_title %}
{% block content %}
  <table class="table">
    <thead>
      <tr>
        <th scope="col">Datum</th>
        <th scope="col">Ort</th>
        <th scope="col">Adresse</th>
        <th scope="col">Gerät anmelden</th>
      </tr>
    </thead>
    <tbody>
      {% for cafe in object_list %}
        <tr>
          <td>{{ cafe.event_date|date:"l" }}, {{ cafe.event_date|date }}</td>
          <td>{{ cafe.location }}</td>
          <td>{{ cafe.address }}</td>
          <td>
            <a href="{% url 'register_device' cafe.pk %}"
               class="btn btn-primary register_link">Gerät anmelden</a>
          </td>
        </tr>
      {% empty %}
        <tr>
          <td colspan="4">Es sind keine Repair-Cafés angelegt.</td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock content %}
