diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-10-02 19:06:05 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:38:32 +0200 |
| commit | 8ee253c715bbfb8175a1fa2ca83334a774b01941 (patch) | |
| tree | 360b101c050fd8e6a36ed5505b1efdbff57248ab /ishtar_common/templates/ishtar/sheet_import.html | |
| parent | a7a0b8e6cf8d67cc50eefe79a65caa93f6059169 (diff) | |
| download | Ishtar-8ee253c715bbfb8175a1fa2ca83334a774b01941.tar.bz2 Ishtar-8ee253c715bbfb8175a1fa2ca83334a774b01941.zip | |
✨ import sheet
Diffstat (limited to 'ishtar_common/templates/ishtar/sheet_import.html')
| -rw-r--r-- | ishtar_common/templates/ishtar/sheet_import.html | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/sheet_import.html b/ishtar_common/templates/ishtar/sheet_import.html new file mode 100644 index 000000000..6ee4837a9 --- /dev/null +++ b/ishtar_common/templates/ishtar/sheet_import.html @@ -0,0 +1,108 @@ +{% extends "ishtar/sheet.html" %} +{% load i18n window_header window_field window_tables %} + +{% block head_title %}<strong>{% trans "Import" %}</strong> – {{item.name}}{% endblock %} + +{% block toolbar %} +{% window_nav item window_id 'show-import' %} +{% endblock %} + +{% block content %} +{% trans "Source" as source_label %} +{% trans "Media" as media_label %} +{% trans "Result" as result_label %} +{% trans "Error" as error_label %} +{% trans "Match" as match_label %} + +{% with current_import=item %}{% with object=item %} +{% with imported_list=object.get_all_imported %} +{% with updated_list=object.get_all_updated %} + +{% if output != "ODT" and output != "PDF" %} +<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" id="{{window_id}}-general-tab" + data-toggle="tab" href="#{{window_id}}-general" role="tab" + aria-controls="{{window_id}}-general" aria-selected="false"> + {% trans "General" %} + </a> + </li> + {% if imported_list %}<li class="nav-item"> + <a class="nav-link" id="{{window_id}}-created-tab" + data-toggle="tab" href="#{{window_id}}-created" role="tab" + aria-controls="{{window_id}}-general" aria-selected="false"> + {% trans "Created" %} + </a> + </li>{% endif %} + {% if updated_list %}<li class="nav-item"> + <a class="nav-link" id="{{window_id}}-updated-tab" + data-toggle="tab" href="#{{window_id}}-updated" role="tab" + aria-controls="{{window_id}}-updated" aria-selected="false"> + {% trans "Updated" %} + </a> + </li>{% endif %} +</ul> +{% endif %} + +<div class="tab-content" id="{{window_id}}-tab-content"> + <div class="tab-pane fade show active" id="{{window_id}}-general" + role="tabpanel" aria-labelledby="{{window_id}}-general-tab"> + <div class="row mb-3"> + {% field_flex "Name" item.name %} + {% 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 %} + </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}} + </div> + + {% if item.imported_file %} + <div class="col-12 col-md-6 col-lg-3 flex-wrap"> + {% with file_label=source_label logo='fa fa-fw fa-file-text-o' file_type='source' file=item.imported_file %} + {% include "ishtar/blocks/import_table_buttons_view.html" %} + {% endwith %} + </div> + + {% if item.get_imported_images %} + <div class="col-12 col-md-6 col-lg-3 flex-wrap"> + {% with file_label=media_label logo='fa fa-fw fa-file-image-o' file_type='' file=item.get_imported_images %} + {% include "ishtar/blocks/import_table_buttons_view.html" %} + {% endwith %} + </div>{% endif %} + {% elif item.archive_file %} + <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 %} + </div> + </div> + {% if imported_list %} + <div class="tab-pane fade" id="{{window_id}}-created" + role="tabpanel" aria-labelledby="{{window_id}}-created-tab"> + <div class="row"> + {% for accessor, imported in imported_list %} + {% include "ishtar/import_associated_item.html" %} + {% endfor %} + {% comment %}<div><div>{% endcomment %} + </div> + </div> + </div> + </div>{% endif %} + {% if updated_list %} + <div class="tab-pane fade" id="{{window_id}}-updated" + role="tabpanel" aria-labelledby="{{window_id}}-updated-tab"> + <div class="row"> + {% for accessor, imported in updated_list %} + {% include "ishtar/import_associated_item.html" %} + {% endfor %} + {% comment %}<div><div>{% endcomment %} + </div> + </div> + </div> + </div>{% endif %} +</div> + +{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endblock %} |
