1
0
Fork 0

More flexible templates

This commit is contained in:
Mouse Reeve 2021-11-13 09:34:10 -08:00
parent acc32d579e
commit 60fb1ac2e6
2 changed files with 22 additions and 39 deletions

View file

@ -18,47 +18,19 @@
</div>
{% endblock %}
{% block table_headers %}
<tr>
<th>
{% trans "Row" %}
</th>
<th>
{% trans "Title" %}
</th>
<th>
{% trans "ISBN" %}
</th>
<th>
{% trans "Author" %}
</th>
<th>
{% trans "Review" %}
</th>
{% block import_cols_headers %}
<th>
{% trans "Actions" %}
</th>
</tr>
{% endblock %}
{% block table_row %}
<tr>
{% block index_col %}
<td rowspan="2">
{{ item.index }}
</td>
<td>
{{ item.normalized_data.title }}
</td>
<td>
{{ item.isbn }}
</td>
<td>
{{ item.normalized_data.authors }}
</td>
<td>
<p>{% include 'snippets/stars.html' with rating=item.rating %}</p>
<p>{{ item.review|truncatechars:100 }}</p>
</td>
{% endblock %}
{% block import_cols %}
<td>
<div class="content is-flex">
<form class="pr-2" name="approve-{{ item.id }}" method="POST" action="{% url 'import-approve' job.id item.id %}">
@ -78,9 +50,11 @@
</form>
</div>
</td>
</tr>
{% endblock %}
{% block action_row %}
<tr>
<td colspan="5">
<td colspan="6">
<div class="columns is-mobile">
{% with guess=item.book_guess %}
<div class="column is-narrow">