{% extends "base.html" %} {% block title %}{{ database }}: {{ table }}: {% if count_truncated %}{{ "{:,}".format(count - 1) }}+ rows{% elif count or count == 0 %}{{ "{:,}".format(count) }} row{% if count == 1 %}{% else %}s{% endif %}{% endif %}{% if human_description_en %} {{ human_description_en }}{% endif %}{% endblock %} {% block extra_head %} {{- super() -}} {% if table_page_data.foreignKeys %} {% endif %} {% if table_insert_ui or table_alter_ui or row_mutation_ui %} {% endif %} {% if table_page_data.executeSql %} {% include "_column_stats_loader.html" %} {% endif %} {% endblock %} {% block body_class %}table db-{{ database|to_css_class }} table-{{ table|to_css_class }}{% endblock %} {% block crumbs %} {{ crumbs.nav(request=request, database=database, table=table) }} {% endblock %} {% block recent_item %}{% with recent_type=("view" if is_view else "table"), recent_name=table, recent_title=metadata.get("title"), recent_url=urls.table(database, table) %}{% include "_recent_item.html" %}{% endwith %}{% endblock %} {% block content %} {% set action_links, action_title = actions(), "View actions" if is_view else "Table actions" %} {% include "_action_menu.html" %} {{ top_table() }} {% block description_source_license %}{% include "_description_source_license.html" %}{% endblock %} {% if metadata.get("columns") %}
{% for column_name, column_description in metadata.columns.items() %}
{{ column_name }}
{{ column_description }}
{% endfor %}
{% endif %} {% macro pagination_links() %} {% if page_position %} Back to first page {% endif %} {% if next_url %} Next page {% endif %} {% endmacro %} {# The heading always carries the total row count; the position strip above the table repeats it alongside the page position #} {% set paginated = page_position or next_url %} {% set count_in_strip = paginated and count is not none and not count_truncated %} {% if count or count == 0 or human_description_en %}

{% if count_truncated %}{{ "{:,}".format(count - 1) }}+ rows {% elif count or count == 0 %}{{ "{:,}".format(count) }} row{% if count == 1 %}{% else %}s{% endif %}{% endif %} {% if human_description_en %}{{ human_description_en }}{% endif %}

{% endif %}
{% if supports_search %}
{% endif %} {% for column, lookup, value in filters.selections() %}
{% endfor %}
{% if is_sortable %}
{% endif %} {% for key, value in form_hidden_args %} {% endfor %} {% if clear_filters_url %} Clear filters {% endif %}
{% if extra_wheres_for_ui %}

{{ extra_wheres_for_ui|length }} extra where clause{% if extra_wheres_for_ui|length != 1 %}s{% endif %}

{% endif %}
{% if query.sql and allow_execute_sql %} View and edit SQL {% endif %} {% include "_export_button.html" %}
{% set export_meta = table %} {% set export_scope = "Filtered rows" if filter_description_en else "All rows" %} {% set export_scope_description = [filter_description_en, sort_description_en]|select|join(", ") or ("in this view" if is_view else "in this table") %} {% set export_rows = { "page": display_rows|length, "more": true if next_url else false, "later": true if request.args.get("_next") else false, "max": settings.max_returned_rows, "total": count if (count is not none and not count_truncated) else none, "count_url": urls.table(database, table) ~ "/-/count", } %} {% include "_export_dialog.html" %} {% if suggested_facets %} {% include "_suggested_facets.html" %} {% endif %} {% if facets_timed_out %}

These facets timed out: {{ ", ".join(facets_timed_out) }}

{% endif %} {% if facet_results %} {% include "_facet_results.html" %} {% endif %} {% if all_columns %} {% endif %} {% if set_column_type_ui %} {% endif %} {% if table_insert_ui %}
{% endif %} {% if paginated %} {% endif %} {% include custom_table_templates %} {# A second set of buttons below the table is only worth it on a longer page #} {% if paginated and display_rows|length >= 5 %} {% endif %} {% if table_definition %}
Table schema
{{ table_definition }}
{% endif %} {% if view_definition %}
View definition
{{ view_definition }}
{% endif %} {% if allow_execute_sql and query.sql %} {% endif %} {% endblock %}