{% extends 'tom_common/base.html' %}
{% block title %}Data Product Groups{% endblock %}
{% block content %}
<a href="{% url 'tom_dataproducts:group-create' %}" class="btn btn-primary">Create New List</a>
<table class="table table-striped">
  <thead><tr><th>Name</th><th>Products</th><th>Created</th><th>Delete</th></tr></thead>
  <tbody>
    {% for group in object_list %}
    <tr>
      <td><a href="{% url 'tom_dataproducts:group-detail' group.id %}">{{ group.name }}</a></td>
      <td>{{ group.dataproduct_set.count }}</td>
      <td>{{ group.created }}</td>
      <td><a href="{% url 'tom_dataproducts:group-delete' group.id %}" class="btn btn-warning">Delete</a></td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}
