2020-04-21 14:09:21 +00:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-04-21 14:09:21 +00:00
|
|
|
{% load humanize %}
|
2021-06-07 16:13:24 +00:00
|
|
|
{% load static %}
|
2021-02-28 18:00:36 +00:00
|
|
|
|
|
|
|
{% block title %}{% trans "Import Status" %}{% endblock %}
|
|
|
|
|
2021-03-05 14:41:21 +00:00
|
|
|
{% block content %}{% spaceless %}
|
2021-11-12 21:10:52 +00:00
|
|
|
<header class="block">
|
2021-02-27 22:22:39 +00:00
|
|
|
<h1 class="title">{% trans "Import Status" %}</h1>
|
2021-06-14 18:59:44 +00:00
|
|
|
<a href="{% url 'import' %}" class="has-text-weight-normal help subtitle is-link">{% trans "Back to imports" %}</a>
|
2020-04-21 14:09:21 +00:00
|
|
|
|
2021-11-12 21:10:52 +00:00
|
|
|
<div class="block">
|
|
|
|
<dl>
|
|
|
|
<dt class="is-pulled-left mr-5">{% trans "Import started:" %}</dt>
|
|
|
|
<dd>{{ job.created_date | naturaltime }}</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if not complete %}
|
|
|
|
<div class="box is-processing">
|
|
|
|
<div class="block">
|
|
|
|
<span class="icon icon-spinner is-pulled-left" aria-hidden="true"></span>
|
|
|
|
<span>{% trans "In progress" %}</span>
|
|
|
|
<span class="is-pulled-right">
|
|
|
|
<a href="" class="button is-small">{% trans "Refresh" %}</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="is-flex">
|
|
|
|
<progress class="progress is-success is-medium mr-2" value="{{ percent }}" max="100">{{ percent }}%</progress>
|
|
|
|
<span>{{ percent }}%</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-11 21:00:34 +00:00
|
|
|
{% endif %}
|
2021-11-12 21:10:52 +00:00
|
|
|
</header>
|
2020-11-12 21:52:57 +00:00
|
|
|
|
|
|
|
<div class="block">
|
2021-11-12 21:10:52 +00:00
|
|
|
<h2 class="title is-4">
|
|
|
|
{% trans "Your Import" %}
|
|
|
|
</h2>
|
2020-09-30 19:11:53 +00:00
|
|
|
<table class="table">
|
|
|
|
<tr>
|
|
|
|
<th>
|
2021-11-12 21:10:52 +00:00
|
|
|
{% trans "Row" %}
|
2020-09-30 19:11:53 +00:00
|
|
|
</th>
|
|
|
|
<th>
|
2021-02-27 22:22:39 +00:00
|
|
|
{% trans "Title" %}
|
2020-09-30 19:11:53 +00:00
|
|
|
</th>
|
|
|
|
<th>
|
2021-02-27 22:22:39 +00:00
|
|
|
{% trans "Author" %}
|
2020-09-30 19:11:53 +00:00
|
|
|
</th>
|
|
|
|
<th>
|
2021-11-12 21:10:52 +00:00
|
|
|
{% trans "Book" %}
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
{% trans "Status" %}
|
2020-09-30 19:11:53 +00:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
{% for item in items %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2021-11-12 21:10:52 +00:00
|
|
|
{{ item.index }}
|
2020-09-30 19:11:53 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2021-05-11 20:28:52 +00:00
|
|
|
{{ item.data.Title }}
|
2020-09-30 19:11:53 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2021-05-11 20:28:52 +00:00
|
|
|
{{ item.data.Author }}
|
2020-09-30 19:11:53 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2020-11-12 21:52:57 +00:00
|
|
|
{% if item.book %}
|
2021-11-12 21:10:52 +00:00
|
|
|
<a href="{{ item.book.local_path }}">
|
|
|
|
{% include 'snippets/book_cover.html' with book=item.book cover_class='is-h-s' size='small' %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if item.book %}
|
|
|
|
<span class="icon icon-check has-text-success" aria-hidden="true"></span>
|
|
|
|
<span class="is-sr-only-mobile">{% trans "Imported" %}</span>
|
|
|
|
|
|
|
|
{% elif item.fail_reason %}
|
|
|
|
<span class="icon icon-x has-text-danger" aria-hidden="true"></span>
|
|
|
|
<span class="is-sr-only-mobile">
|
|
|
|
{{ item.fail_reason }}
|
2020-11-12 21:52:57 +00:00
|
|
|
</span>
|
2021-11-12 21:10:52 +00:00
|
|
|
{% else %}
|
|
|
|
<span class="icon icon-dots-three" aria-hidden="true"></span>
|
|
|
|
<span class="is-sr-only-mobile">{% trans "Pending" %}</span>
|
2020-09-30 19:11:53 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
2021-11-12 21:10:52 +00:00
|
|
|
|
|
|
|
<div>
|
|
|
|
{% include 'snippets/pagination.html' with page=items %}
|
|
|
|
</div>
|
2021-03-05 14:41:21 +00:00
|
|
|
{% endspaceless %}{% endblock %}
|
2021-03-19 17:51:45 +00:00
|
|
|
|
|
|
|
{% block scripts %}
|
2021-09-10 17:57:16 +00:00
|
|
|
<script src="{% static "js/check_all.js" %}?v={{ js_cache }}"></script>
|
2021-03-19 17:51:45 +00:00
|
|
|
{% endblock %}
|