{% if not tbl_is_view and not db_is_system_schema %}
{% endif %}
{% if not tbl_is_view and not db_is_system_schema and tbl_storage_engine != 'ARCHIVE' %}
{{ include('modals/index_dialog_modal.twig') }}
{% endif %}
{# Display partition details #}
{% if have_partitioning %}
{# Detect partitioning #}
{% if partition_names is not empty and partition_names[0] is not null %}
{% set first_partition = partitions[0] %}
{% set range_or_list = first_partition.getMethod() == 'RANGE'
or first_partition.getMethod() == 'RANGE COLUMNS'
or first_partition.getMethod() == 'LIST'
or first_partition.getMethod() == 'LIST COLUMNS' %}
{% set sub_partitions = first_partition.getSubPartitions() %}
{% set has_sub_partitions = first_partition.hasSubPartitions() %}
{% if has_sub_partitions %}
{% set first_sub_partition = sub_partitions[0] %}
{% endif %}
{% if default_sliders_state != 'disabled' %}
{% endif %}
{% include 'table/structure/display_partitions.twig' with {
'db': db,
'table': table,
'partitions': partitions,
'partition_method': first_partition.getMethod(),
'partition_expression': first_partition.getExpression(),
'has_description': first_partition.getDescription() is not empty,
'has_sub_partitions': has_sub_partitions,
'sub_partition_method': has_sub_partitions ? first_sub_partition.getMethod(),
'sub_partition_expression': has_sub_partitions ? first_sub_partition.getExpression(),
'range_or_list': range_or_list
} only %}
{% else %}
{% include 'table/structure/display_partitions.twig' with {
'db': db,
'table': table
} only %}
{% endif %}
{% if default_sliders_state != 'disabled' %}
{% endif %}
{% endif %}
{# Displays Space usage and row statistics #}
{% if show_stats %}
{{ table_stats|raw }}
{% endif %}
{% endblock %}