{% extends 'generic/object.html' %}
{% load buttons %}
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}

{% block extra_controls %}
    {% if perms.netbox_todo.add_accesslist %}
        <a href="{% url add_url %}?{{ model_type }}={{ object.pk }}&return_url={{ object.get_absolute_url }}"
           class="btn btn-sm btn-primary">
            <i class="mdi mdi-plus-thick"></i> Add Access List
        </a>
    {% endif %}
{% endblock extra_controls %}

{% block content %}
    {% include 'inc/table_controls_htmx.html' with table_modal=table_config %}
    <form method="post">
        {% csrf_token %}
        <div class="card">
            <div class="card-body" id="object_list">
                {% include 'htmx/table.html' %}
            </div>
        </div>
    </form>
{% endblock content %}

{% block modals %}
    {{ block.super }}
    {% table_config_form table %}
{% endblock modals %}
