diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-10-05 13:14:56 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:38:32 +0200 |
commit | b75d3163bed945b58e643982820883e72e4b8dc4 (patch) | |
tree | b39667e726a6be31ff231d2ac32b5e364297d1df /ishtar_common/templates | |
parent | 5a33b5bd2641dd665cb450b2e95069f4d8204cd9 (diff) | |
download | Ishtar-b75d3163bed945b58e643982820883e72e4b8dc4.tar.bz2 Ishtar-b75d3163bed945b58e643982820883e72e4b8dc4.zip |
✨ improve import and import group sheet
- link to errors, match, result files
- pre import values
- link to associated imports and group imports
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_import.html | 2 | ||||
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_import_gen.html | 55 | ||||
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_importgroup.html | 2 |
3 files changed, 53 insertions, 6 deletions
diff --git a/ishtar_common/templates/ishtar/sheet_import.html b/ishtar_common/templates/ishtar/sheet_import.html index 8685d9ae8..be5e12340 100644 --- a/ishtar_common/templates/ishtar/sheet_import.html +++ b/ishtar_common/templates/ishtar/sheet_import.html @@ -1,7 +1,7 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_header window_field window_tables %} -{% block head_title %}<strong>{% trans "Import" %}</strong> – {{item.name}}{% endblock %} +{% block head_title %}<strong>{% trans "Import" %}</strong> – {{item.name}} – {{item.importer_type}}{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-import' %} diff --git a/ishtar_common/templates/ishtar/sheet_import_gen.html b/ishtar_common/templates/ishtar/sheet_import_gen.html index 86c2ac6fe..4078c059b 100644 --- a/ishtar_common/templates/ishtar/sheet_import_gen.html +++ b/ishtar_common/templates/ishtar/sheet_import_gen.html @@ -1,4 +1,4 @@ -{% load i18n window_header window_field window_tables %} +{% load i18n link_to_window window_header window_field window_tables %} {% trans "Source" as source_label %} {% trans "Media" as media_label %} {% trans "Result" as result_label %} @@ -43,12 +43,13 @@ {% field_flex "Type" item.importer_type %} <div class="col-12 col-md-6 col-lg-3 flex-wrap"> - <i class="fa fa-hourglass-start" aria-hidden="true"></i> {{item.creation_date|date:"DATE_FORMAT"}} {{item.creation_date|time:"H:i"}} - {% if item.end_date %}<br><i class="fa fa-hourglass-end" aria-hidden="true"></i> {{item.end_date|date:"DATE_FORMAT"}} {{item.end_date|time:"H:i"}}{% endif %} + <i class="fa fa-fw fa-user" aria-hidden="true"></i> {{item.user}} </div> <div class="col-12 col-md-6 col-lg-3 flex-wrap"> - <i class="fa fa-fw fa-user" aria-hidden="true"></i> {{item.user}} + <i class="fa fa-hourglass-start" aria-hidden="true"></i> {{item.creation_date|date:"DATE_FORMAT"}} {{item.creation_date|time:"H:i"}} + {% if item.end_date %}<br><i class="fa fa-hourglass-end" aria-hidden="true"></i> {{item.end_date|date:"DATE_FORMAT"}} {{item.end_date|time:"H:i"}}{% endif %} </div> + {% field_flex_detail "Import group" item.group %} {% if item.imported_file %} <div class="col-12 col-md-6 col-lg-3 flex-wrap"> @@ -67,7 +68,53 @@ <div class="col-12 col-md-6 col-lg-3 flex-wrap"> <i class="fa fa-fw fa-file-archive-o" aria-hidden="true"></i> <a href='{{item.archive_file.url}}'>{% trans "Archive" context "name" %}</a> </div>{% endif %} + + {% if item.error_file %} + <div class="col-12 col-md-6 col-lg-3 flex-wrap"> + {% with file_label=error_label logo='text-danger fa fa-fw fa-exclamation-triangle' file_type='error' file=item.error_file %} + {% include "ishtar/blocks/import_table_buttons_view.html" %} + {% endwith %} + </div> + {% endif %} + + {% if item.result_file %} + <div class="col-12 col-md-6 col-lg-3 flex-wrap"> + {% with file_label=result_label logo='fa fa-fw fa-th' file_type='result' file=item.result_file %} + {% include "ishtar/blocks/import_table_buttons_view.html" %} + {% endwith %} + </div> + {% endif %} + + {% if item.match_file %} + <div class="col-12 col-md-6 col-lg-3 flex-wrap"> + {% with file_label=match_label logo='fa fa-fw fa-arrows-h' file_type='match' file=item.match_file %} + {% include "ishtar/blocks/import_table_buttons_view.html" %} + {% endwith %} + </div> + {% endif %} + {% with import_list=item.import_list %}{% if import_list %} + <hr class="col-12"> + <dl class="col-12 flex-wrap"> + <dt>{% trans "Associated imports" %}</dt> + <dd>{% for import in import_list %}{{import|simple_link_to_window}} {{import}}<br>{% endfor %}</dd> + </dl> + {% endif %} {% endwith %} + </div> + + + {% with pre_import_items=item.pre_import_items %}{% if pre_import_items %} + <h3>{% trans "Pre-import values "%}</h3> + <div class="row mb-3">{% for k, v in pre_import_items %} + <dl class="col-12 col-md-6 col-lg-3 flex-wrap"> + <dt> + {{k}} + </dt> + <dd> + {{v}} + </dd> + </dl>{% endfor %} </div> + {% endif %}{% endwith %} </div> {% if imported_list %} <div class="tab-pane fade" id="{{window_id}}-created" diff --git a/ishtar_common/templates/ishtar/sheet_importgroup.html b/ishtar_common/templates/ishtar/sheet_importgroup.html index 593642945..050da29a2 100644 --- a/ishtar_common/templates/ishtar/sheet_importgroup.html +++ b/ishtar_common/templates/ishtar/sheet_importgroup.html @@ -1,7 +1,7 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_header window_field window_tables %} -{% block head_title %}<strong>{% trans "Import" %}</strong> – {{item.name}}{% endblock %} +{% block head_title %}<strong>{% trans "Import group" %}</strong> – {{item.name}} – {{item.importer_type}}{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-importgroup' %} |