2020-07-09 01:57:30 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-07-12 15:29:36 +00:00
|
|
|
|
2020-07-09 01:57:30 +00:00
|
|
|
<h1>Results</h1>
|
|
|
|
|
|
|
|
<table id="books">
|
|
|
|
<tr>
|
|
|
|
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
2020-07-11 20:36:26 +00:00
|
|
|
<th class="title" onclick="sortTable(0)">Title</th>
|
|
|
|
<th class="author" onclick="sortTable(1)">Author</th>
|
|
|
|
<th class="rating" onclick="sortTable(2)">Rating</th>
|
|
|
|
<th class="tags" onclick="sortTable(3)">Tags</th>
|
|
|
|
<th class="added" onclick="sortTable(4)">Added</th>
|
2020-07-09 01:57:30 +00:00
|
|
|
</tr>
|
2020-07-09 14:58:09 +00:00
|
|
|
{% for book in book_list %}
|
2020-07-09 01:57:30 +00:00
|
|
|
<tr>
|
|
|
|
<td><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></td>
|
|
|
|
<td>{{book.author_sort}}</td>
|
|
|
|
<td> {% for rating in book.ratings.all %}
|
|
|
|
{{rating}}
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% for tag in book.tags.all %}
|
|
|
|
{{tag}},
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
<td>{{book.timestamp}}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|