2020-03-23 12:40:09 -04:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-27 21:48:10 -05:00
|
|
|
{% load i18n %}
|
2020-04-21 10:09:21 -04:00
|
|
|
{% load humanize %}
|
2021-02-28 13:00:36 -05:00
|
|
|
|
|
|
|
{% block title %}{% trans "Import Books" %}{% endblock %}
|
|
|
|
|
2020-03-23 12:40:09 -04:00
|
|
|
{% block content %}
|
2020-09-30 00:45:59 -04:00
|
|
|
<div class="block">
|
2021-02-27 17:22:39 -05:00
|
|
|
<h1 class="title">{% trans "Import Books" %}</h1>
|
2021-01-12 14:28:03 -05:00
|
|
|
<form name="import" action="/import" method="post" enctype="multipart/form-data">
|
2020-03-23 12:40:09 -04:00
|
|
|
{% csrf_token %}
|
2021-02-20 11:02:36 -05:00
|
|
|
|
|
|
|
<label class="label" for="source">
|
2021-02-27 17:22:39 -05:00
|
|
|
<p>{% trans "Data source" %}</p>
|
2021-02-20 11:02:36 -05:00
|
|
|
<div class="select {{ class }}">
|
|
|
|
<select name="source" id="source">
|
2021-02-26 07:32:17 -05:00
|
|
|
<option value="GoodReads" {% if current == 'GoodReads' %}selected{% endif %}>
|
2021-02-20 11:02:36 -05:00
|
|
|
GoodReads
|
|
|
|
</option>
|
|
|
|
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
|
|
|
|
LibraryThing
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
2020-10-30 14:21:02 -04:00
|
|
|
<div class="field">
|
|
|
|
{{ import_form.as_p }}
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2020-11-09 15:40:22 -05:00
|
|
|
<label class="label">
|
2021-02-27 17:22:39 -05:00
|
|
|
<input type="checkbox" name="include_reviews" checked> {% trans "Include reviews" %}
|
2020-11-09 15:40:22 -05:00
|
|
|
</label>
|
2020-10-30 14:21:02 -04:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2020-11-12 15:09:47 -05:00
|
|
|
<label class="label">
|
2021-02-27 17:22:39 -05:00
|
|
|
<p>{% trans "Privacy setting for imported reviews:" %}</p>
|
2020-11-09 15:40:22 -05:00
|
|
|
{% include 'snippets/privacy_select.html' with no_label=True %}
|
|
|
|
</label>
|
2020-10-30 14:21:02 -04:00
|
|
|
</div>
|
2021-02-27 17:22:39 -05:00
|
|
|
<button class="button is-primary" type="submit">{% trans "Import" %}</button>
|
2020-03-23 12:40:09 -04:00
|
|
|
</form>
|
2020-09-30 00:45:59 -04:00
|
|
|
</div>
|
2020-04-21 10:09:21 -04:00
|
|
|
|
2020-09-30 00:45:59 -04:00
|
|
|
<div class="content block">
|
2021-02-27 17:22:39 -05:00
|
|
|
<h2 class="title">{% trans "Recent Imports" %}</h2>
|
2020-09-30 00:45:59 -04:00
|
|
|
{% if not jobs %}
|
2021-02-27 17:22:39 -05:00
|
|
|
<p>{% trans "No recent imports" %}</p>
|
2020-09-30 00:45:59 -04:00
|
|
|
{% endif %}
|
2020-04-21 10:09:21 -04:00
|
|
|
<ul>
|
|
|
|
{% for job in jobs %}
|
2021-01-12 14:28:03 -05:00
|
|
|
<li><a href="/import/{{ job.id }}">{{ job.created_date | naturaltime }}</a></li>
|
2020-04-21 10:09:21 -04:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2020-03-23 12:40:09 -04:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|