{# The columns page's body — crate::pages::admin::table_definition::ui::ColumnsFragment. Both writes on this page swap it, so it carries the outcome as well as the forms. #} {% include "pages/admin/table_definition/feedback.html" %} {% if page.table_is_writable() %} {# Append columns. The panel stages columns without writing anything; the selection travels in the URL so the posted fields are exactly the ones the Add-table builder posts, and both are decoded by the same code. #}

{{ nav.tr("td-add-columns-to") }} {{ page.selection.table }}

{{ nav.tr("td-append-hint") }}

{% include "pages/admin/table_definition/column_panel.html" %}
{% if let Some(detail) = page.detail %}

{{ nav.tr("td-rename-column") }}

{{ nav.tr("td-rename-hint") }}

{% for column in detail.columns %}
{% endfor %}
{% endif %} {% endif %} {% if let Some(detail) = page.detail %}

{{ nav.tr("td-columns-now") }} {{ detail.columns.len() }}

{% for column in detail.columns %} {% endfor %}
{{ nav.tr("td-col-column") }}{{ nav.tr("td-col-type") }}{{ nav.tr("td-col-notes") }}
{{ column.name }} {{ column.field_type }}{% if !column.sql_type.is_empty() %} {{ column.sql_type }}{% endif %} {%- for flag in column.flags(nav.locale) %}{{ flag }}{% endfor -%}
{% if !detail.scripts.is_empty() %}

{{ nav.tr("td-scripts") }}

{% for script in detail.scripts %} {% endfor %}
{{ nav.tr("td-col-target-column") }}{{ nav.tr("td-col-type") }}{{ nav.tr("td-col-description") }}
{{ script.target_column }} {{ script.target_column_type }} {{ script.description }}
{{ nav.tr("td-source") }}
{{ script.script }}
{% endif %}
{% endif %}