{# The append-columns panel — crate::pages::admin::table_definition::ui::ColumnPanelFragment, and what workspace.html embeds inside #column-form. Staging a column writes nothing, so these buttons swap this panel alone. Saving is the form's own submit, which swaps the whole workspace. The field names are the ones crate::schema::ColumnForm declares — the same set the Add-table builder posts, decoded by the same code. #} {# Staging swaps this panel and nothing else, so a refused column has nowhere else to be reported. When the workspace embeds the panel it reports the outcome at the top instead, and this block stays out of the way. #} {% import "ui/alert.html" as panel_alert %} {% import "ui/dialog.html" as panel_dialog %} {% import "ui/toast.html" as panel_toast %} {% if standalone_column_panel %} {%- if let Some(message) = page.error %}{% call panel_alert::error(nav.locale, nav.tr("td-could-not-add-column"), message) %}{% endcall %}{% endif -%} {%- if let Some(message) = page.status %}{% call panel_toast::success(nav.tr("td-staged"), message) %}{% endcall %}{% endif -%} {%- if let Some(message) = page.error %}{% call panel_dialog::error(nav.locale, nav.tr("td-could-not-add-column"), message) %}{% endcall %}{% endif -%} {% endif %}
{{ nav.tr("td-indexed-automatically") }}
{{ nav.tr("td-shared-no-quantity-ledger") }}
{% endif %}{{ nav.tr("td-no-staged-columns") }} {{ nav.tr("td-stage-column") }}.
{% else %}| {{ nav.tr("td-col-name") }} | {{ nav.tr("td-col-type") }} | {{ nav.tr("td-col-indexed") }} | {{ nav.tr("td-col-options") }} | |
|---|---|---|---|---|
{{ column.name }} |
{{ column.data_type }} | {# A compound column expands into schema-managed companions, so there is no column of its own name to index. #} {% if page.columns.is_indexable(*loop.index0) %} {% else if column.is_indexed() %} {{ nav.tr("td-indexed-automatically-tag") }} {% else %} — {% endif %} | {% if column.required %}{{ nav.tr("column-flag-required") }}{% endif %} {% if column.quantity_ledger %}{{ nav.tr("column-flag-quantity-ledger") }}{% endif %} {% if !column.currency.is_empty() %}{{ column.currency }}, {{ column.money_mode.display_label(nav.locale) }}{% endif %} |