{% extends "admin/import_export/base.html" %} {% load i18n admin_urls import_export_tags %} {% block breadcrumbs_last %} {% trans "Import" %} {% endblock %} {% block form_top %} {% if confirm_form %}

{% trans "Preview" %}
{% trans "Below is a preview of data to be imported. If you are satisfied with the results, click 'Confirm import'" %}

{% if result %} {% if not result.has_errors %}
{% for field in result.diff_headers %} {% endfor %} {% for row in result.rows %} {% for field in row.diff %} {% endfor %} {% endfor %}
{{ field }}
{% if row.import_type == 'new' %} {% trans "New" %} {% elif row.import_type == 'skip' %} {% trans "Skipped" %} {% elif row.import_type == 'delete' %} {% trans "Delete" %} {% elif row.import_type == 'update' %} {% trans "Update" %} {% endif %} {{ field }}
{% endif %} {% endif %} {% else %}

{% trans "This importer will import the following fields:" %} {{ fields|join:", " }}

{% endif %} {% endblock %} {% block field_sets %} {% if confirm_form %} {# Render Confirm Form #} {{ confirm_form.as_p }} {% else %} {{ block.super }} {% endif %} {% endblock %} {% block admin_form %} {% if confirm_form %} {# Override Form URL for Confirm Form #} {% url opts|admin_urlname:'process_import' as form_url %} {% endif %} {{ block.super }} {% endblock %} {% block submit_buttons_bottom %} {% if confirm_form %}
{% trans 'Cancel' %} {% trans 'Back' %}
{% else %} {{ block.super }} {% endif %} {% endblock %}