{% extends 'base/layout.html' %} {% load buttons %} {% load helpers %} {% load render_table from django_tables2 %} {% load static %} {% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %} {% block controls %}
{% block extra_controls %}{% endblock %} {% if permissions.add and 'add' in action_buttons %} {% add_button content_type.model_class|validated_viewname:"add" %} {% endif %} {% if permissions.add and 'import' in action_buttons %} {% import_button content_type.model_class|validated_viewname:"import" %} {% endif %} {% if 'export' in action_buttons %} {% export_button content_type %} {% endif %}
{% endblock controls %} {% block tabs %} {% endblock tabs %} {% block content-wrapper %}
{# Object list #}
{# Applied filters #} {% if filter_form %} {% applied_filters filter_form request.GET %} {% endif %} {# "Select all" form #} {% if table.paginator.num_pages > 1 %} {% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %}
{% csrf_token %}
{% if bulk_edit_url and permissions.change %} {% endif %} {% if bulk_delete_url and permissions.delete %} {% endif %}
{% endwith %} {% endif %} {# Object table controls #} {% include 'inc/table_controls.html' with table_modal="ObjectTable_config" %}
{% csrf_token %} {# Object table #}
{% render_table table 'inc/table.html' %}
{# Form buttons #} {% if permissions.change or permissions.delete %} {% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %}
{% block bulk_buttons %}{% endblock %} {% if bulk_edit_url and permissions.change %} {% endif %} {% if bulk_delete_url and permissions.delete %} {% endif %}
{% endwith %} {% endif %}
{# Paginator #} {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{# Filter form #} {% if filter_form %}
{% include 'inc/filter_list.html' %}
{% endif %}
{# Table config form #} {% table_config_form table table_name="ObjectTable" %} {% endblock content-wrapper %}