diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/import_list.html')
-rw-r--r-- | ishtar_common/templates/ishtar/import_list.html | 71 |
1 files changed, 10 insertions, 61 deletions
diff --git a/ishtar_common/templates/ishtar/import_list.html b/ishtar_common/templates/ishtar/import_list.html index 4ac8a79be..a5fa34660 100644 --- a/ishtar_common/templates/ishtar/import_list.html +++ b/ishtar_common/templates/ishtar/import_list.html @@ -2,71 +2,20 @@ {% load i18n inline_formset %} {% block pre_container %} +<button id="autorefreshpage" + class="nav-button btn btn-sm btn-secondary disabled" + data-link="{% url 'current_imports_table' %}" + data-div="import-container" + title="{% trans 'Autorefresh the table (useful when waiting for an import result)' %}"> + <i class="fa fa-refresh" aria-hidden="true"></i> +</button> + <form action="." method="post">{% csrf_token %} {% endblock %} {% block content %} -<h2>{{page_name}}</h2> -<div class='form'> -{% if not object_list %} -<p>{% trans "No pending imports." %}</p> -{% else %} -<table class="table table-striped"> -<tr> - <th>{% trans "Name" %}</th> - <th>{% trans "Type" %}</th> - <th>{% trans "File" context "file" %}</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> -</tr> -{% for import in object_list %} -<tr> - <td> - {{import.name|default:"-"}} - </td> - <td> - {{import.importer_type}} - </td> - <td> - <a href='{{import.imported_file.url}}'>{% trans "Source file" %}</a> - </td> - <td> - {{import.creation_date}} ({{import.user}}) - </td> - <td> - {{import.status}} - </td> - <td> - <select name='import-action-{{import.pk}}'> - <option value=''>--------</option> - {% for action, lbl in import.get_actions %} - <option value='{{action}}'>{{lbl}}</option> - {% endfor%} - </select> - </td> - <td> - {% if import.need_matching %} - <a href='{% url "import_link_unmatched" import.pk %}'>{% trans "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> -</tr> -{% endfor %} -</table> -{% endif %} +<div id="import-container"> + {% include "ishtar/import_table.html" %} </div> {% endblock %} |