diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-09-11 19:00:28 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:38:32 +0200 | 
| commit | a7e8a1c1bd3a73fcd9a9d4528cb15ccd9c901bc0 (patch) | |
| tree | 377f2200474d4393994716b3ba8496fb1766aa0e /ishtar_common | |
| parent | 37a23f20320eea2d6b85fa9bb326846aea68d7ed (diff) | |
| download | Ishtar-a7e8a1c1bd3a73fcd9a9d4528cb15ccd9c901bc0.tar.bz2 Ishtar-a7e8a1c1bd3a73fcd9a9d4528cb15ccd9c901bc0.zip  | |
💄 reorganize import tables
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/templates/ishtar/import_table.html | 97 | 
1 files changed, 44 insertions, 53 deletions
diff --git a/ishtar_common/templates/ishtar/import_table.html b/ishtar_common/templates/ishtar/import_table.html index f027e07c5..f066bef2a 100644 --- a/ishtar_common/templates/ishtar/import_table.html +++ b/ishtar_common/templates/ishtar/import_table.html @@ -41,41 +41,23 @@          <tr>              <th>{% trans "Name" %}</th>              <th>{% trans "Type" %}</th> -            <th>{% trans "File" context "file" %}</th> -            <th>{% trans "Media" %}</th> -            <th>{% trans "Creation" %}</th>              <th>{% trans "Status" %}</th>              <th>{% trans "Action" %}</th> -            <th>{% trans "Unmatched items" %}</th> -            <th>{% trans "Error" %}</th> -            <th>{% trans "Control" %}</th> -            <th>{% trans "Match" %}</th> +            <th>{% trans "Files" context "file" %}</th> +            <th>{% trans "Pré-import form / matching" %}</th> +            <th>{% trans "Diagnostic files" %}</th>          </tr>          {% for import in object_list %} -        <tr id="import-{{import.import_id}}"{% if import.pk in refreshed_pks %} class='bg-info'{% endif %}> +        <tr id="import-{{import.import_id}}" +             class='import-row{% if import.error_file %}-error{% endif %}{% if import.pk in refreshed_pks %} bg-info{% endif %}'>              <td> -                {{import.name|default:"-"}} +                <strong>{{import.name|default:"-"}}</strong><br> +                <small><i class="fa fa-calendar" aria-hidden="true"></i>  {{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 %}</small><br> +                <small><i class="fa fa-user" aria-hidden="true"></i>  {{import.user}}</small>              </td>              <td>                  {{import.importer_type}} ({% if import.importer_type.type_label %}{% trans import.importer_type.type_label %}{% else %}{% trans "Group" %}{% endif %})              </td> -            <td> -                {% if import.imported_file %} -                <a href='{{import.imported_file.url}}'>{% trans "Source file" %}</a> -                {% elif import.archive_file %} -                <a href='{{import.archive_file.url}}'>{% trans "Archive" context "name" %}</a> -                {% endif %} -            </td> -            <td> -                {% if import.imported_images %} -                    <a href="{{ import.imported_images.url }}">{% trans "Media file" %}</a> -                {% else %} -                    – -                {% endif %} -            </td> -            <td> -                {{import.creation_date|date:"DATE_FORMAT"}} {{import.creation_date|time:"H:i"}} - {{import.user}} -            </td>              <td id="status-{{import.import_id}}">                  {{import.status}}              </td> @@ -90,19 +72,30 @@                  </select>              </td>              <td> +                {% if import.imported_file %} +                <a href='{{import.imported_file.url}}'>{% trans "Source" %}</a> +                {% if import.imported_images %} +                - <a href="{{ import.imported_images.url }}">{% trans "Media" %}</a> +                {% endif %} +                {% elif import.archive_file %} +                <a href='{{import.archive_file.url}}'>{% trans "Archive" context "name" %}</a> +                {% endif %} +            </td> +            <td>                  {% if import.need_matching %} -                <a href='{% url "import_link_unmatched" import.pk %}'>{% trans "Match"%}</a> +                <a href='{% url "import_link_unmatched" import.pk %}'>{% trans "Make match" %}</a>                  {% endif %}              </td>              <td style="white-space: nowrap;">{% if import.error_file %} -                <i class="text-danger fa fa-exclamation-triangle" aria-hidden="true"></i> <a href='{{import.error_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> -            <td>{% if import.result_file %} -                <a href='{{import.result_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> -            <td>{% if import.match_file %} -                <a href='{{import.match_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> +                <i class="text-danger fa fa-exclamation-triangle" aria-hidden="true"></i> <a href='{{import.error_file.url}}'>{% trans "Error" %}</a> +                <br>{% endif %} +            {% if import.result_file %} +                <a href='{{import.result_file.url}}'>{% trans "Result" %}</a> +                <br>{% endif %} +            {% if import.match_file %} +                <a href='{{import.match_file.url}}'>{% trans "Match" %}</a> +                {% endif %} +            </td>          </tr>          {% if import.importer_type.type_label %}          <tr></tr>{# only for even and odd style #} @@ -122,29 +115,27 @@          <tr id="import-{{sub.import_id}}">              <td></td>              <td>{{sub.importer_type}}</td> -            <td>{% if sub.imported_file %} -                <a href='{{sub.imported_file.url}}'>{% trans "Source file" %}</a> -            {% endif %}</td> -            <td>{% if sub.imported_images %} -                <a href="{{ sub.imported_images.url }}">{% trans "Media file" %}</a> -                {% else %} – -                {% endif %} -            </td> -            <td></td>              <td id="status-{{sub.import_id}}">{{sub.status}}</td>              <td></td> +            <td>{% if sub.imported_file %} +                <a href='{{sub.imported_file.url}}'>{% trans "Source" %}</a> +                {% if sub.imported_images %} +                - <a href="{{ sub.imported_images.url }}">{% trans "Media" %}</a> +                {% endif %} +            {% endif %}</td>              <td>{% if sub.need_matching %} -                <a href='{% url "import_link_unmatched" sub.pk %}'>{% trans "Match"%}</a> +                <a href='{% url "import_link_unmatched" sub.pk %}'>{% trans "Make match" %}</a>              {% endif %}</td>              <td style="white-space: nowrap;">{% if sub.error_file %} -                <i class="text-danger fa fa-exclamation-triangle" aria-hidden="true"></i> <a href='{{sub.error_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> -            <td>{% if sub.result_file %} -                <a href='{{sub.result_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> -            <td>{% if sub.match_file %} -                <a href='{{sub.match_file.url}}'>{% trans "File" context "not a directory" %}</a> -                {% endif %}</td> +                <i class="text-danger fa fa-exclamation-triangle" aria-hidden="true"></i> <a href='{{sub.error_file.url}}'>{% trans "Error" %}</a> +                <br>{% endif %} +            {% if sub.result_file %} +                <a href='{{sub.result_file.url}}'>{% trans "Result" %}</a> +                <br>{% endif %} +            {% if sub.match_file %} +                <a href='{{sub.match_file.url}}'>{% trans "Match" %}</a> +                {% endif %} +            </td>          </tr>          <tr></tr>{# only for even and odd style #}          <tr id="progress-display-{{sub.id}}"{% if sub.state != 'IP' and sub.state != 'PP' %} style="display:none"{% endif %}>  | 
