From 3d651cd74507e5cf87f39e08b94b7492766aa893 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 15 Sep 2023 14:58:46 +0200 Subject: đŸ’„ better layout of import tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/templates/ishtar/import_table.html | 123 +++++++++++++---------- scss/custom.scss | 8 +- 2 files changed, 77 insertions(+), 54 deletions(-) diff --git a/ishtar_common/templates/ishtar/import_table.html b/ishtar_common/templates/ishtar/import_table.html index 62545f5a3..9aef388b9 100644 --- a/ishtar_common/templates/ishtar/import_table.html +++ b/ishtar_common/templates/ishtar/import_table.html @@ -49,12 +49,12 @@ {% for import in object_list %} - - {{import.name|default:"-"}}
-   {{import.creation_date|date:"DATE_FORMAT"}} {{import.creation_date|time:"H:i"}} - {% if import.end_date %}{{import.end_date|date:"DATE_FORMAT"}} {{import.end_date|time:"H:i"}}{% endif %}
-   {{import.user}} - + class='import-row{% if import.error_file or not import.pre_import_form_is_valid %}-error{% endif %}{% if import.pk in refreshed_pks %} bg-info{% endif %}'> + {{import.importer_type}} ({% if import.importer_type.type_label %}{% trans import.importer_type.type_label %}{% else %}{% trans "Group" %}{% endif %}) @@ -71,36 +71,39 @@ {% endfor%} - - {% if import.imported_file %} - {% trans "Source" %} - {% if import.imported_images %} - - {% trans "Media" %} - {% endif %} - {% elif import.archive_file %} - {% trans "Archive" context "name" %} - {% endif %} - - - {% if import.has_pre_import_form %} - {% if not import.pre_import_form_is_valid %} - - {% endif %} - {% trans "Pre-import values" %}
- {% endif %} - {% if import.need_matching %} - {% trans "Make match" %} - {% endif %} - - {% if import.error_file %} - {% trans "Error" %} -
{% endif %} - {% if import.result_file %} - {% trans "Result" %} -
{% endif %} - {% if import.match_file %} - {% trans "Match" %} - {% endif %} + + + {% if import.importer_type.type_label %} @@ -123,24 +126,38 @@ {{sub.importer_type}} {{sub.status}} - {% if sub.imported_file %} - {% trans "Source" %} - {% if sub.imported_images %} - - {% trans "Media" %} - {% endif %} - {% endif %} - {% if sub.need_matching %} - {% trans "Make match" %} - {% endif %} - {% if sub.error_file %} - {% trans "Error" %} -
{% endif %} - {% if sub.result_file %} - {% trans "Result" %} -
{% endif %} - {% if sub.match_file %} - {% trans "Match" %} + + + {# only for even and odd style #} diff --git a/scss/custom.scss b/scss/custom.scss index 1883798a2..934d67937 100644 --- a/scss/custom.scss +++ b/scss/custom.scss @@ -672,10 +672,15 @@ div#validation-bar{ color: darken(red, 20%); } -.import-row-error { +.import-row-error, +.table-striped tbody tr:nth-of-type(2n+1).import-row-error { background-color: lighten(red, 40%); } +#import-list li { +white-space: nowrap; +} + /* context menu */ #shortcut-menu { width: 700px; @@ -1050,6 +1055,7 @@ ul.compact{ display: none; } +ul.simple, .simple-window-content ul, .ishtar-map-popup ul { margin: 0; -- cgit v1.2.3