2020-04-21 14:09:21 +00:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% load fr_display %}
|
|
|
|
{% load humanize %}
|
|
|
|
{% block content %}
|
2020-09-30 19:11:53 +00:00
|
|
|
<div class="block">
|
|
|
|
<h1 class="title">Import Status</h1>
|
2020-04-21 14:09:21 +00:00
|
|
|
|
2020-09-30 19:11:53 +00:00
|
|
|
<p>
|
|
|
|
Import started: {{ job.created_date | naturaltime }}
|
|
|
|
<p>
|
|
|
|
{% if task.ready %}
|
|
|
|
Import completed: {{ task.date_done | naturaltime }}
|
|
|
|
{% if task.failed %}
|
|
|
|
<h3><span style="background-color: #ffaaaa;">TASK FAILED</span></h3>
|
|
|
|
<p>
|
|
|
|
{{ task.info }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-04-22 13:16:46 +00:00
|
|
|
|
2020-09-30 19:11:53 +00:00
|
|
|
<div class="block">
|
|
|
|
{% if job.import_status %}
|
|
|
|
{% include 'snippets/status.html' with status=job.import_status %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
Import still in progress.
|
|
|
|
<p>
|
|
|
|
(Hit reload to update!)
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-04-21 14:09:21 +00:00
|
|
|
|
2020-09-30 19:11:53 +00:00
|
|
|
<div class="block">
|
|
|
|
<table class="table">
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Book
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Title
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Author
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
{% for item in items %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{% if item.book %}
|
|
|
|
<a href="/book/{{ item.book.id }}">
|
|
|
|
{% include 'snippets/book_cover.html' with book=item.book size='small' %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ item.data|dict_key:'Title' }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ item.data|dict_key:'Author' }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if item.book %}✓
|
|
|
|
{% elif item.fail_reason %}
|
|
|
|
{{ item.fail_reason }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-04-21 14:09:21 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|