summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/templates/ishtar/import_table.html17
-rw-r--r--ishtar_common/views.py5
2 files changed, 15 insertions, 7 deletions
diff --git a/ishtar_common/templates/ishtar/import_table.html b/ishtar_common/templates/ishtar/import_table.html
index 9aef388b9..ba52aa8b9 100644
--- a/ishtar_common/templates/ishtar/import_table.html
+++ b/ishtar_common/templates/ishtar/import_table.html
@@ -1,5 +1,7 @@
{% load i18n l10n inline_formset %}
{% localize off %}<script type="text/javascript">
+ {% comment %}
+ /* TODO : à effacer ? */
var html = $("#message_list").html();
{% if MESSAGES and AJAX %}{% for message, message_type in MESSAGES %}
html += '<div class="alert alert-{{message_type}} alert-dismissible fade show"';
@@ -12,6 +14,7 @@
html += ' </div>';
{% endfor %}{% endif %}
$("#message_list").html(html);
+ {% endcomment %}
$("#import-list").find('select').prop('disabled', true);
$("#import-list").find('input').prop('disabled', true);
@@ -44,8 +47,8 @@
<th>{% trans "Status" %}</th>
<th>{% trans "Action" %}</th>
<th>{% trans "Files" context "file" %}</th>
- <th>{% trans "Pré-import form / matching" %}</th>
- <th>{% trans "Diagnostic files" %}</th>
+ {% if not ARCHIVE_PAGE %}<th>{% trans "Pré-import form / matching" %}</th>
+ <th>{% trans "Diagnostic files" %}</th>{% endif %}
</tr>
{% for import in object_list %}
<tr id="import-{{import.import_id}}"
@@ -81,7 +84,7 @@
{% elif import.archive_file %}<li>
<i class="fa fa-fw fa-file-archive-o" aria-hidden="true"></i> <a href='{{import.archive_file.url}}'>{% trans "Archive" context "name" %}</a>
</li>{% endif %}
- </ul></td>
+ </ul></td>{% if not ARCHIVE_PAGE %}
<td><ul class="simple">
{% if import.has_pre_import_form %}<li>
{% if not import.pre_import_form_is_valid %}
@@ -104,7 +107,7 @@
{% if import.match_file %}<li>
<i class="fa fa-fw fa-arrows-h" aria-hidden="true"></i> <a href='{{import.match_file.url}}'>{% trans "Match" %}</a>
</li>{% endif %}</ul>
- </td>
+ </td>{% endif %}
</tr>
{% if import.importer_type.type_label %}
<tr></tr>{# only for even and odd style #}
@@ -133,7 +136,7 @@
{% if sub.imported_images %}<li>
<i class="fa fa-fw fa-file-image-o" aria-hidden="true"></i> <a href="{{ sub.imported_images.url }}">{% trans "Media" %}</a>
</li>{% endif %}
- </ul></td>
+ </ul></td>{% if not ARCHIVE_PAGE %}
<td><ul class="simple">
{% if sub.has_pre_import_form %}<li>
{% if not sub.pre_import_form_is_valid %}
@@ -147,7 +150,7 @@
<i class="fa fa-fw fa-arrows-h" aria-hidden="true"></i> <a href='{% url "import_link_unmatched" sub.pk %}'>{% trans "Make match" %}</a>
</li>{% endif %}
</ul></td>
- <td style="white-space: nowrap;"><ul class="simple">
+ <td><ul class="simple">
{% if sub.error_file %}<li>
<i class="text-danger fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> <a href='{{sub.error_file.url}}'>{% trans "Error" %}</a>
</li>{% endif %}
@@ -158,7 +161,7 @@
<i class="fa fa-fw fa-arrows-h" aria-hidden="true"></i> <a href='{{sub.match_file.url}}'>{% trans "Match" %}</a>
</li>{% endif %}
</ul>
- </td>
+ </td>{% endif %}
</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 %}>
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index c590532b9..901ebc9b8 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -2051,6 +2051,11 @@ class ImportOldListView(ImportListView):
user = models.IshtarUser.objects.get(pk=self.request.user.pk)
return q.filter(user=user).order_by("-creation_date")
+ def get_context_data(self, **kwargs):
+ data = super().get_context_data(**kwargs)
+ data["ARCHIVE_PAGE"] = True
+ return data
+
def import_get_status(request, current_right=None):
response = {"group": [], "import": []}