mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-03 05:49:35 +00:00
a4bfcb34d5
* cleans up some test logging * cleans up some commented-out code * adds export_job model tests * reconsiders some tests in export user view tests
88 lines
2.9 KiB
HTML
88 lines
2.9 KiB
HTML
{% extends 'preferences/layout.html' %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "User Export" %}{% endblock %}
|
|
|
|
{% block header %}
|
|
{% trans "User Export" %}
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
<div class="block content">
|
|
<p class="notification">
|
|
{% trans "Your exported archive file will include all user data for import into another Bookwyrm server" %}
|
|
</p>
|
|
<form name="export" method="POST" href="{% url 'prefs-user-export' %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="button">
|
|
<span class="icon icon-download" aria-hidden="true"></span>
|
|
<span>{% trans "Create user export file" %}</span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<div class="content block">
|
|
<h2 class="title">{% trans "Recent Exports" %}</h2>
|
|
<p class="content">
|
|
{% trans "User export files will show 'complete' once ready. This may take a little while. Click the link to download your file." %}
|
|
</p>
|
|
<div class="table-container">
|
|
<table class="table is-striped is-fullwidth">
|
|
<tr>
|
|
<th>
|
|
{% trans "Date Created" %}
|
|
</th>
|
|
<th>
|
|
{% trans "Last Updated" %}
|
|
</th>
|
|
<th>
|
|
{% trans "Status" %}
|
|
</th>
|
|
</tr>
|
|
{% if not jobs %}
|
|
<tr>
|
|
<td colspan="4">
|
|
<em>{% trans "No recent imports" %}</em>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% for job in jobs %}
|
|
<tr>
|
|
<td>
|
|
{% if job.complete %}
|
|
<p><a href="/preferences/user-export/{{ job.task_id }}">{{ job.created_date }}</a></p>
|
|
{% else %}
|
|
<p>{{ job.created_date }}</p>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ job.updated_date }}</td>
|
|
<td>
|
|
<span
|
|
{% if job.status == "stopped" %}
|
|
class="tag is-danger"
|
|
{% elif job.status == "pending" %}
|
|
class="tag is-warning"
|
|
{% elif job.complete %}
|
|
class="tag"
|
|
{% else %}
|
|
class="tag is-success"
|
|
{% endif %}
|
|
>
|
|
{% if job.status %}
|
|
{{ job.status }}
|
|
{{ job.status_display }}
|
|
{% elif job.complete %}
|
|
{% trans "Complete" %}
|
|
{% else %}
|
|
{% trans "Active" %}
|
|
{% endif %}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'snippets/pagination.html' with page=jobs path=request.path %}
|
|
</div>
|
|
{% endblock %}
|