summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-03-21 17:55:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-03-27 17:53:27 +0200
commit951b9e9ba349459f5b1abbdd092d5910c346cd9f (patch)
treefddb75df476ad2322feaf0395d25822d8bf25390 /ishtar_common/templates
parent54daa385a241ad272abe9e06a63a0da36ff17749 (diff)
downloadIshtar-951b9e9ba349459f5b1abbdd092d5910c346cd9f.tar.bz2
Ishtar-951b9e9ba349459f5b1abbdd092d5910c346cd9f.zip
Step by step import: present object to be created, updated, etc. (refs #3975)
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/import_step_by_step.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/import_step_by_step.html b/ishtar_common/templates/ishtar/import_step_by_step.html
index 4d7512de1..233889df4 100644
--- a/ishtar_common/templates/ishtar/import_step_by_step.html
+++ b/ishtar_common/templates/ishtar/import_step_by_step.html
@@ -25,6 +25,59 @@
{% else %}
+{% if new_objects %}
+<h4>{% trans "Objects to be created" %}</h4>
+<div>
+ <table class="table table-striped">
+ <tr>
+ <th>{% trans "Path" %}</th>
+ <th>{% trans "Type" %}</th>
+ <th>{% trans "Values" %}</th>
+ </tr>
+{% for path, cls, values in new_objects %}
+ <tr>
+ <td>{{path}}</td>
+ <td>{{cls.get_verbose_name}}</td>
+ <td>{% for k, value in values.items %}<div class="row">
+ <div class="col-6"><strong>{{k}}{% trans ":"%}</strong></div>
+ <div class="col-6">{{value}}</div>
+ </div>{% endfor %}
+ </td>
+ </tr>
+{% endfor %}
+ </table>
+</div>
+{% endif %}
+
+{% if updated_objects %}
+<h4>{% trans "Objects to be updated" %}</h4>
+<div>
+ <table class="table table-striped">
+ <tr>
+ <th>{% trans "Path" %}</th>
+ <th>{% trans "Object" %}</th>
+ <th>{% trans "Matching values" %}</th>
+ <th>{% trans "Updated values" %}</th>
+ </tr>
+ {% for path, obj, values, updated_values in updated_objects %}
+ <tr>
+ <td>{{path}}</td>
+ <td>{{obj}} ({{obj.get_verbose_name}})</td>
+ <td>{% for k, value in values.items %}<div class="row">
+ <div class="col-6"><strong>{{k}}{% trans ":"%}</strong></div>
+ <div class="col-6">{{value}}</div>
+ </div>{% endfor %}
+ <td>{% for k, value in updated_values.items %}<div class="row">
+ <div class="col-6"><strong>{{k}}{% trans ":"%}</strong></div>
+ <div class="col-6">{{value}}</div>
+ </div>{% endfor %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+</div>
+{% endif %}
+
<div>
<table class="table table-striped">
<tr>