From eba9c7a64ad884c8a1fffd4f4b652e6dfff5101c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 1 Jun 2021 12:20:05 +0200 Subject: Import: cleaner layout for match template --- .../templates/ishtar/formset_import_match.html | 98 ++++++++++++---------- 1 file changed, 53 insertions(+), 45 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/formset_import_match.html b/ishtar_common/templates/ishtar/formset_import_match.html index e35195791..acec95a65 100644 --- a/ishtar_common/templates/ishtar/formset_import_match.html +++ b/ishtar_common/templates/ishtar/formset_import_match.html @@ -25,58 +25,66 @@ {% for hidden in frm.hidden_fields %} {{ hidden }} {% endfor %}
+ {% if not formset %} +

{% trans "No more match left." %}

+ {% endif %} {% for frm in formset %}{% ifchanged frm.target.value %} - {# #}{% if not forloop.first%}
{% endif %} -

{{ frm.target.field.choices.0.1 }}

- {% if frm.admin_url %} -

- - {% trans "Edit choices in admin" %} - -

{% endif %} - - - - - - - - - - - {% endifchanged %} - - - - - - {% if forloop.last %} -
{% trans "Key" %}{% trans "Value" %}{% trans "For" %}
- - -
- {{frm.id}} - {{frm.target}} - {{frm.key}} - - {{frm.value}} - - {{frm.remember}} -
{% endif %} + {#
#}{% if not forloop.first %}
{% endif %} +
+

{{ frm.target.field.choices.0.1 }}

+ {% if frm.admin_url %} +

+ + {% trans "Edit choices in admin" %} + +

{% endif %} + + + + + + + + + + + {% endifchanged %} + + + + + + {% if forloop.last %} +
{% trans "Key" %}{% trans "Value" %}{% trans "For" %}
+ + +
+ {{frm.id}} + {{frm.target}} + {{frm.key}} + + {{frm.value}} + + {{frm.remember}} +
{% endif %} + {% empty %} +
+ {% trans "No more match left." %} +
{% endfor %} + {% if frm.errors %}{% endif %} {% for field in frm %} {{field}} - {%endfor%} - + {% endfor %}

-- cgit v1.2.3