{% extends "base.html" %} {% block content %}

{{ heading }}

{{ _("A file's columns are matched to fields by name, so an export of this model can be edited and uploaded back.") }}

{{ ff_icon("arrow-left", size=15) }} {{ _("Back to {name}", name=model_title|lower) }}
{% if error %} {# Red for a file that is genuinely broken, neutral for one that is simply empty -- downloading the template and uploading it back is a normal thing to do, and being shouted at for following the instructions is how a form teaches people to ignore its warnings. #} {% endif %} {# The report. Errors first and nothing written, or a count of what a commit would do -- never both, because a file with one bad row writes none of it. #} {% if plan and plan.errors %} {% elif plan and checked_only %}
{{ _("{name} is ready to import.", name=filename) }}

{{ _("{new} rows would be created and {existing} updated. Nothing has been written.", new=plan.creates, existing=plan.updates) }}

{% endif %}
{{ _("CSV, Excel or JSON.") }}

{{ _("Columns") }}

{{ _("Any column not listed here is ignored, and any of these may be left out.") }}

{# The same control the list's export offers, because it is the same three formats and the same choice -- a menu there and a row of buttons here would be two spellings of one idea. Hidden on arrival and unfolded by a stylesheet rule without script, exactly as that one is. #}
{% for column in columns %}
{{ column.name }} {% if column.required %} {{ _("(required)") }} {% endif %}
{{ column.hint or EMPTY }}
{% endfor %}
{% endblock %}