2020-03-23 16:40:09 +00:00
|
|
|
{% extends 'layout.html' %}
|
2020-04-21 14:09:21 +00:00
|
|
|
{% load humanize %}
|
2020-03-23 16:40:09 +00:00
|
|
|
{% block content %}
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="block">
|
2020-11-09 20:06:44 +00:00
|
|
|
<h1 class="title">Import Books from GoodReads</h1>
|
2020-11-11 05:34:26 +00:00
|
|
|
<form name="import" action="/import-data/" method="post" enctype="multipart/form-data">
|
2020-03-23 16:40:09 +00:00
|
|
|
{% csrf_token %}
|
2020-10-30 18:21:02 +00:00
|
|
|
<div class="field">
|
|
|
|
{{ import_form.as_p }}
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2020-11-09 20:40:22 +00:00
|
|
|
<label class="label">
|
|
|
|
<input type="checkbox" name="include_reviews" checked> Include reviews
|
|
|
|
</label>
|
2020-10-30 18:21:02 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2020-11-12 20:09:47 +00:00
|
|
|
<label class="label">
|
|
|
|
<p>Privacy setting for imported reviews:</p>
|
2020-11-09 20:40:22 +00:00
|
|
|
{% include 'snippets/privacy_select.html' with no_label=True %}
|
|
|
|
</label>
|
2020-10-30 18:21:02 +00:00
|
|
|
</div>
|
|
|
|
<button class="button is-primary" type="submit">Import</button>
|
2020-03-23 16:40:09 +00:00
|
|
|
</form>
|
2020-09-30 04:45:59 +00:00
|
|
|
</div>
|
2020-04-21 14:09:21 +00:00
|
|
|
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="content block">
|
|
|
|
<h2 class="title">Recent Imports</h2>
|
|
|
|
{% if not jobs %}
|
|
|
|
<p>No recent imports</p>
|
|
|
|
{% endif %}
|
2020-04-21 14:09:21 +00:00
|
|
|
<ul>
|
|
|
|
{% for job in jobs %}
|
2020-11-11 05:34:26 +00:00
|
|
|
<li><a href="/import-status/{{ job.id }}">{{ job.created_date | naturaltime }}</a></li>
|
2020-04-21 14:09:21 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2020-03-23 16:40:09 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|