blob: 5dba51b6f66e5487ffbe662d96525942ece5bfba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{% extends "base.html" %}
{% load i18n inline_formset %}
{% load url from future %}
{% block content %}
<h2>{{page_name}}</h2>
<div class='form'>
{% if not object_list %}
<p>{% trans "No pending imports." %}</p>
{% else %}
<form action="." method="post">{% csrf_token %}
<table class="clean-table">
<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>
</tr>
{% for import in object_list %}
<tr>
<td>
{{import.name|default:"-"}}
</td>
<td>
{{import.importer_type}}
</td>
<td>
<a href='{{MEDIA_URL}}{{import.imported_file}}'>{% 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 "Link unmatched items" %}</a>
{% endif %}
</td>
<td>{% if import.error_file %}
<a href='{{MEDIA_URL}}{{import.error_file}}'>{% trans "Error file" %}</a>
{% endif %}</td>
<td>{% if import.result_file %}
<a href='{{MEDIA_URL}}{{import.result_file}}'>{% trans "Control file" %}</a>
{% endif %}</td>
<td>{% if import.match_file %}
<a href='{{MEDIA_URL}}{{import.match_file}}'>{% trans "Match file" %}</a>
{% endif %}</td>
</tr>
{% endfor %}
</table>
<input type="submit" onclick="long_wait();return true;" value="{% trans "Validate" %}" />
</form>
{% endif %}
</div>
{% endblock %}
|