{% load bootstrap4 %}
{% if products_page.has_other_pages %}
  {% bootstrap_pagination products_page parameter_name="page_saved" %}
{% endif%}
<table class="table table-striped">
  <thead>
    <tr>
      <th>Filename</th>
      <th>Type</th>
      <th>Created</th>
      <th>Delete</th>
    </tr>
  </thead>
  <tbody>
    {% for product in products_page %}
    <tr>
      <td><a href="{{ product.data.url }}">{{ product.get_file_name }}</a></td>
      <td>
        {% if product.data_product_type %}
          {{ product.get_type_display }}
        {% endif %}
      </a></td>
      <td>{{ product.created }}</td>
      <td><a href="{% url 'tom_dataproducts:delete' product.id %}" class="btnbtn-danger">Delete</a></td>
    </tr>
    {% empty %}
    <tr>
      <td colspan="6">
        No saved data for this observation.
      </td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% if products_page.has_other_pages %}
  {% bootstrap_pagination products_page parameter_name="page_saved" %}
{% endif%}
