{% extends "adminsite/base.html" %} {% block page_title %}{{ _('Import {things}', things=view.label_plural|lower) }} · {{ title }}{% endblock %} {% block header %} {% endblock %} {% block content %} {% set creating = plan.count("create") %} {% set updating = plan.count("update") %} {% set problems = plan.count("error") %}
{{ filename }} {{ _('{count} new', count=creating) }} {{ _('{count} changed', count=updating) }} {% if problems %}{{ _('{count} with problems', count=problems) }}{% endif %} {% if plan.ignored %} {{ _('Not used: {names}', names=plan.ignored|join(', ')) }} {% endif %}
{{ csrf_input | safe if csrf_input }} {{ _('Choose another file') }}
{% for path in plan.columns %}{% endfor %} {% for row in shown %} {% for path in plan.columns %} {% endfor %} {% set missing = row.errors.keys()|reject("in", plan.columns)|list %} {% if missing %} {% endif %} {% endfor %}
{{ _('Row') }} {{ _('Does') }}{{ view.label_for(path) }}
{{ row.number }} {% if row.action == "create" %}{{ _('new') }} {% elif row.action == "update" %}{{ _('change') }} {% else %}{{ _('problem') }}{% endif %} {{ row.raw.get(path, "") }} {% if row.errors.get(path) %}

{{ row.errors[path] }}

{% endif %}
{% for path in missing %}{{ view.label_for(path) }}: {{ row.errors[path] }}{% if not loop.last %} · {% endif %}{% endfor %}
{% if shown|length < plan.rows|length %}

{{ _('Showing {shown} of {total} rows: the first 50 and the ones with problems.', shown=shown|length, total=plan.rows|length) }}

{% endif %}
{% endblock %}