styles for import status page

This commit is contained in:
Mouse Reeve 2020-09-30 12:11:53 -07:00
parent 92ef3a574c
commit f6d754f0c4

View file

@ -2,68 +2,71 @@
{% load fr_display %} {% load fr_display %}
{% load humanize %} {% load humanize %}
{% block content %} {% block content %}
<div id="content"> <div class="block">
<div> <h1 class="title">Import Status</h1>
<h1>Import Status</h1>
<p> <p>
Import started: {{ job.created_date | naturaltime }} Import started: {{ job.created_date | naturaltime }}
<p> <p>
{% if task.ready %} {% if task.ready %}
Import completed: {{ task.date_done | naturaltime }} Import completed: {{ task.date_done | naturaltime }}
{% if task.failed %} {% if task.failed %}
<h3><span style="background-color: #ffaaaa;">TASK FAILED</span></h3> <h3><span style="background-color: #ffaaaa;">TASK FAILED</span></h3>
<p> <p>
{{ task.info }} {{ task.info }}
{% endif %} {% endif %}
</div>
{% if job.import_status %} <div class="block">
{% include 'snippets/status.html' with status=job.import_status %} {% if job.import_status %}
{% endif %} {% include 'snippets/status.html' with status=job.import_status %}
{% else %} {% endif %}
Import still in progress. {% else %}
<p> Import still in progress.
(Hit reload to update!) <p>
{% endif %} (Hit reload to update!)
{% endif %}
</div>
<table> <div class="block">
<tr> <table class="table">
<th> <tr>
Book <th>
</th> Book
<th> </th>
Title <th>
</th> Title
<th> </th>
Author <th>
</th> Author
<th> </th>
</th> <th>
</tr> </th>
{% for item in items %} </tr>
<tr> {% for item in items %}
<td> <tr>
{% if item.book %} <td>
<a href="/book/{{ item.book.id }}"> {% if item.book %}
{% include 'snippets/book_cover.html' with book=item.book size='small' %} <a href="/book/{{ item.book.id }}">
</a> {% include 'snippets/book_cover.html' with book=item.book size='small' %}
{% endif %} </a>
</td> {% endif %}
<td> </td>
{{ item.data|dict_key:'Title' }} <td>
</td> {{ item.data|dict_key:'Title' }}
<td> </td>
{{ item.data|dict_key:'Author' }} <td>
</td> {{ item.data|dict_key:'Author' }}
<td> </td>
{% if item.book %}✓ <td>
{% elif item.fail_reason %} {% if item.book %}✓
{{ item.fail_reason }} {% elif item.fail_reason %}
{% endif %} {{ item.fail_reason }}
</td> {% endif %}
</tr> </td>
{% endfor %} </tr>
</table> {% endfor %}
</div> </table>
</div>
</div> </div>
{% endblock %} {% endblock %}