{# The preparation, one step at a time — crate::pages::import_export::import::ui::ImportStep. Every button that moves between steps swaps this whole block, so each step re-states the answers the next one needs as hidden fields. The page keeps no server-side draft: what the form carries is the entire state of the preparation. #}
{{ nav.tr("import-mapping-hint") }}
{{ nav.tr_args("import-mapping-rows", [("rows", step.source_rows.to_string())]) }}
| {{ nav.tr("import-th-position") }} | {% if step.has_source_names %}{{ nav.tr("import-th-source-name") }} | {% endif %}{{ nav.tr("import-th-example") }} | {{ nav.tr("import-th-destination") }} |
|---|---|---|---|
| {{ row.position }} | {% if step.has_source_names %}{% if let Some(name) = row.source_name %}{{ name }}{% endif %} | {% endif %}{{ row.example }} |
{{ nav.tr("import-template-hint") }}
| {{ nav.tr("import-th-order") }} | {{ nav.tr("import-th-include") }} | {{ nav.tr("import-th-destination") }} |
|---|---|---|
| {# Both fields post in document order, so moving a row moves the generated header with it: `template_order` remembers where the unticked ones sit, `template_columns` is the header itself. #} | {{ row.name }}{% if row.required %} {{ nav.tr("import-required-column") }}{% endif %} |
{{ nav.tr("import-template-generated") }}
{{ step.header }}
{% else %}
{{ nav.tr("import-template-nothing-chosen") }}
{% endif %}{{ nav.tr("import-template-round-trip") }}
{{ nav.tr_args("import-summary-missing-required", [("columns", step.missing_required.join(", "))]) }}
{% endif %}| {{ column }} | {% endfor %}
|---|
| {{ value }} | {% endfor %}
{{ nav.tr_args("import-preview-more-rows", [("rows", step.hidden_rows.to_string())]) }}
{% endif %}{{ nav.tr("import-prepared-csv-hint") }}
{{ step.csv }}