From 34a462b58fa629af474bada00a5eba366a07ca59 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 23 Mar 2018 13:57:12 +0100 Subject: Step by step: large improvments on step display (refs #3975) Show modified, sheet access for existing items, link between created, updated fields and associated column. --- .../templates/ishtar/import_step_by_step.html | 116 ++++++++++++--------- 1 file changed, 67 insertions(+), 49 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/import_step_by_step.html b/ishtar_common/templates/ishtar/import_step_by_step.html index 233889df4..c827156c5 100644 --- a/ishtar_common/templates/ishtar/import_step_by_step.html +++ b/ishtar_common/templates/ishtar/import_step_by_step.html @@ -1,9 +1,8 @@ {% extends "base.html" %} -{% load i18n inline_formset %} +{% load i18n inline_formset link_to_window %} {% block content %} -

{% trans "Import step by step" %}

-

{{import.name}} – {% trans "line " %} {{line_number_displayed}}

+

{% trans "Import step by step" %} – {{import.name}} – {% trans "line " %} {{line_number_displayed}}

{% if errors %} +
+{% endfor %} {% endif %} {% if updated_objects %} -

{% trans "Objects to be updated" %}

-
- - - - - - - - {% for path, obj, values, updated_values in updated_objects %} - - - - - - {% endfor %} -
{% trans "Path" %}{% trans "Object" %}{% trans "Matching values" %}{% trans "Updated values" %}
{{path}}{{obj}} ({{obj.get_verbose_name}}){% for k, value in values.items %}
-
{{k}}{% trans ":"%}
-
{{value}}
-
{% endfor %} -
{% for k, value in updated_values.items %}
-
{{k}}{% trans ":"%}
-
{{value}}
-
{% endfor %} -
+

{% trans "Objects to be updated" %}

+{% for path, obj, values, old_and_updated in updated_objects %} + +
+
+
{{path}} – {{obj}} {{obj|link_to_window}} ({{obj.get_verbose_name}})
+
+
+ +
{% trans "Matching values" %}
+ + + + + + {% for k, value in values.items %} + + + {% endfor %} +
{% trans "Key" %}{% trans "Value" %}
{{k|safe}}{{value}}
+ + +
{% trans "Updated values" %}
+ + + + + + + + {% for k, value in old_and_updated.items %} + + + + + {% endfor %} +
{% trans "Key" %}{% trans "Old value" %}{% trans "New value" %}{% trans "Changed" %}
{{k|safe}}{{value.0|safe}}{{value.1|safe}}{% if value.2%} + {% else %}–{% endif %}
+
+ +
+{% endfor %} + {% endif %} +

{% trans "CSV values" %}

+
- - + {% comment %}{% endcomment %} - {% for idx, name, raw, interpreted in values %} + {% for idx, name, raw, interpreted in values %} - - + {% endfor %}
{% trans "Column number" %} {% trans "Name" %} {% trans "Raw CSV value" %}{% trans "Current value" %}{% trans "New value" %}{% trans "Interpreted value" %}{% trans "Merged value" %}
{{idx}} {{name|safe}} {{raw}}{{interpreted}}{{interpreted|safe}}
-- cgit v1.2.3