moviewyrm/bookwyrm/templates/import/import_status.html

145 lines
4.5 KiB
HTML
Raw Normal View History

{% extends 'layout.html' %}
2021-02-28 02:48:10 +00:00
{% load i18n %}
{% load humanize %}
2021-06-07 16:13:24 +00:00
{% load static %}
{% block title %}{% trans "Import Status" %}{% endblock %}
{% block content %}{% spaceless %}
2021-11-12 21:10:52 +00:00
<header class="block">
2021-11-12 22:38:41 +00:00
{% if job.retry %}
<h1 class="title">{% trans "Retry Status" %}</h1>
{% else %}
<h1 class="title">{% trans "Import Status" %}</h1>
2021-11-12 22:38:41 +00:00
{% endif %}
<a href="{% url 'import' %}" class="has-text-weight-normal help subtitle is-link">{% trans "Back to imports" %}</a>
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 22:36:28 +00:00
2021-11-12 23:34:48 +00:00
{% if manual_review_count %}
<div class="notification">
{% blocktrans trimmed count counter=manual_review_count with display_counter=manual_review_count|intcomma %}
{{ display_counter }} item needs manual review.
{% plural %}
{{ display_counter }} items need manual review.
{% endblocktrans %}
</div>
{% endif %}
2021-11-12 22:38:41 +00:00
{% if complete and fail_count and not job.retry %}
2021-11-12 22:36:28 +00:00
<div class="notification is-warning">
{% blocktrans trimmed count counter=fail_count with display_counter=fail_count|intcomma %}
{{ display_counter }} item failed to import.
{% plural %}
{{ display_counter }} items failed to import.
{% endblocktrans %}
<a href="{% url 'import-troubleshoot' job.id %}">
{% trans "View and troubleshoot failed items." %}
</a>
</div>
{% 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">
2021-11-12 22:36:28 +00:00
{% block page_title %}
2021-11-12 21:10:52 +00:00
{% trans "Your Import" %}
2021-11-12 22:36:28 +00:00
{% endblock %}
2021-11-12 21:10:52 +00:00
</h2>
2021-11-12 22:36:28 +00:00
{% block actions %}{% endblock %}
2020-09-30 19:11:53 +00:00
<table class="table">
2021-11-13 00:23:56 +00:00
{% block table_headers %}
2020-09-30 19:11:53 +00:00
<tr>
<th>
2021-11-12 21:10:52 +00:00
{% trans "Row" %}
2020-09-30 19:11:53 +00:00
</th>
<th>
{% trans "Title" %}
2020-09-30 19:11:53 +00:00
</th>
2021-11-12 22:54:20 +00:00
<th>
{% trans "ISBN" %}
</th>
2020-09-30 19:11:53 +00:00
<th>
{% 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>
2021-11-13 00:23:56 +00:00
{% endblock %}
2020-09-30 19:11:53 +00:00
{% for item in items %}
2021-11-13 00:23:56 +00:00
{% block table_row %}
2020-09-30 19:11:53 +00:00
<tr>
<td>
2021-11-12 21:10:52 +00:00
{{ item.index }}
2020-09-30 19:11:53 +00:00
</td>
<td>
2021-11-12 22:54:20 +00:00
{{ item.normalized_data.title }}
</td>
<td>
{{ item.isbn }}
2020-09-30 19:11:53 +00:00
</td>
<td>
2021-11-12 22:54:20 +00:00
{{ item.normalized_data.authors }}
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>
2021-11-13 00:23:56 +00:00
{% endblock %}
2020-09-30 19:11:53 +00:00
{% endfor %}
</table>
</div>
2021-11-12 21:10:52 +00:00
<div>
{% include 'snippets/pagination.html' with page=items %}
</div>
{% endspaceless %}{% endblock %}
2021-03-19 17:51:45 +00:00
{% block scripts %}
<script src="{% static "js/check_all.js" %}?v={{ js_cache }}"></script>
2021-03-19 17:51:45 +00:00
{% endblock %}