{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load django_tables2 %}

{% block title %}{% trans 'List' %}{% endblock %}


{% block content %}

    <div class="table-container">
        <h3>{{ title }} {% trans 'List' %}
            {% if create_url %}
                <a href="{% url create_url %}"> <i class="fas fa-plus-circle"></i>
                </a>
            {% endif %}
        </h3>

        {% if filter %}
            <br/>
            <br/>
            <form action="." method="get">
                {% csrf_token %}
                {{ filter.form|crispy }}
                <button type="submit" class="btn btn-success">{% trans 'Filter' %}</button>
            </form>
        {% endif %}

        {% if import_btn %}
            <a href="{% url 'data_batch_import' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
            <br/>
            <br/>
        {% endif %}

        {% render_table table %}

    </div>

{% endblock content %}