{% extends 'jsondataferret/base.html' %}


{% block breadcrumbs %}
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="{% url 'jsondataferret_index' %}">Home</a></li>
        <li class="breadcrumb-item"><a href="{% url 'jsondataferret_type_list' %}">Types</a></li>
        <li class="breadcrumb-item"><a href="{% url 'jsondataferret_type_index' public_id=type.public_id %}">Type {{ type.title }}</a></li>
        <li class="breadcrumb-item active" aria-current="page">Records</li>
      </ol>
    </nav>
{% endblock %}

{% block content %}

    {% if page_obj.paginator.count > 0 %}
        <table class="table">
            <tr>
                <td>ID</td>
                <td>&nbsp;</td>
            </tr>
            {% for record in page_obj %}
                <tr>
                    <td><a href="{% url 'jsondataferret_record_index' type_id=type.public_id record_id=record.public_id %}">{{ record.public_id }}</a></td>
                    <td><a href="{% url 'jsondataferret_record_index' type_id=type.public_id record_id=record.public_id %}" class="btn btn-primary">View</a></td>
                </tr>
            {% endfor %}
        </table>

        {% include "jsondataferret/common/pagination.html" %}
    {% else %}
        <p>No records are available.</p>
    {% endif %}

{% endblock %}
