{# The heading and action switcher shared by the five table-definition pages. Every one of them carries a `page` (crate::pages::admin::table_definition:: state::TableDefinitionPageState), whose `active` says which is open. These are deliberately separate pages, for the same reason the permission sections are: adding a column, dropping a table, copying a profile and reading its rename history are four different decisions, and stacking them on one screen was what made the old workspace impossible to find anything in. Which links appear follows how much has been selected — the table-wide ones need a table, the profile-wide ones only a profile. #}

{%- if page.selection.has_table() %}{{ page.selection.scope_label() }}{% else %}Table definition{% endif -%}

{%- if page.selection.has_table() %}{{ page.selection.table }}{% else %}{{ page.selection.scope_label() }}{% endif -%}

{%- if let Some(detail) = page.detail -%} {{ detail.columns.len() }} columns · identified by {%- if detail.row_display_columns.is_empty() %} its id {%- else %} {{ detail.row_display_columns|join(", ") }}{% endif -%} {%- if let Some(summary) = page.selected_table() -%} {%- if !summary.depends_on.is_empty() %} · depends on {{ summary.depends_on|join(", ") }}{% endif -%} {%- endif -%} . {%- else -%} Everything on this page acts on this profile. {%- endif -%}

← Admin panel
{% if page.selection.has_table() && !page.table_is_writable() %}

Backend-managed

This table is the backend's own. Its definition is visible in the admin panel, but it can only be changed through the backend's own APIs, so none of the write actions apply to it.

{% endif %}