{% extends "base.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}

{% load bootstrap %}
{% load i18n %}

{% block content %}
  <h2>{{ title }}</h2>

  <p>{% trans "Delete the following snapshots permanently?" %}</p>

  <div class="table-responsive">
    <table class="table">
      <thead>
        <th>{% trans "Number" %}</th>
        <th>{% trans "Date" %}</th>
        <th>{% trans "Description" %}</th>
      </thead>
      <tbody>
        {% for snapshot in snapshots %}
          <tr>
            <td>{{ snapshot.number }}</td>
            <td>{{ snapshot.date }}</td>
            <td>{{ snapshot.description }}</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>

  <p>
    <form class="form" method="post">
      {% csrf_token %}

      {% for snapshot in snapshots %}
        <input type="hidden" name="snapshots" value="{{ snapshot.number }}" />
      {% endfor %}

      <input type="submit" class="btn btn-danger" name="delete_confirm"
             value="{% trans 'Delete Snapshots' %}"/>
    </form>
  </p>

{% endblock %}
