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

{% load render_table from django_tables2 %}
{% block content_container_class %}container-fluid content-wide px-3{% endblock %}
{% block css %}
{% endblock %}

{% block content %}

    <div class="container-fluid">
        <div class="d-flex align-items-start justify-content-between">
            <h2 class="mb-0">{{ model_verbose_name_plural|capfirst }}</h2>
            {% if request.user.is_staff and create_url %}
                <div>
                    <a class="btn btn-sm btn-primary" href="{{ create_url }}">Add new {{ model_verbose_name }}</a>
                </div>
            {% endif %}
        </div>
{% comment %}         <details>
            <summary>
                <h4>Filter</h4>
            </summary>
            <div id="view-filter-options">
                <form action="" method="get">
                    {{ filter.form }}
                    <input class="btn btn-primary btn-sm mt-1 mb-1" type="submit" />
                </form>
            </div>
        </details> {% endcomment %}
        {% render_table table %}
        {% include "generic/partials/filter_bar.html" with filter=filter app_name=app_name collapse_id="bottom-filter-body" %}
    </div>

    <div id="exam-options"></div>
{% endblock %}
