This commit is contained in:
MassiveAtoms
2020-07-15 12:20:35 -03:00
parent d57f677bd3
commit 14f14a2f33
10 changed files with 101 additions and 8 deletions

View File

@ -16,6 +16,7 @@
<th class="rating" onclick="sortTable(2)">Rating</th>
<th class="tags" onclick="sortTable(3)">Tags</th>
<th class="added" onclick="sortTable(4)">Added</th>
<th class="added" onclick="sortTable(5)">Published</th>
</tr>
{% for book in book_list %}
<tr>
@ -30,7 +31,8 @@
{{tag}},
{% endfor %}
</td>
<td>{{book.timestamp}}</td>
<td>{{book.timestamp | timesince}} ago</td> <!-- YES, very good sorting here.... // DEBUG fix js so it can sort this -->
<td>{{book.pubdate.year}}</td>
</tr>
{% endfor %}
</table>

View File

@ -0,0 +1,38 @@
{% extends "base.html" %}
{% block content %}
<h1>{{Series}} </h1>
<table id="books" class="highlight centered">
<tr>
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
<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>
</tr>
{% for book in books %}
<tr>
<td><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></td>
<td>{{book.author_sort}}</td>
<td> {% for rating in book.rating.all %}
{{rating}}
{% endfor %}
</td>
<td>
{% for tag in book.tags.all %}
{{tag}},
{% endfor %}
</td>
<td>{{book.timestamp}}</td>
</tr>
{% endfor %}
</table>
{% endblock %}

View File

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block content %}
<h1>Author List</h1>
{% if series_list %}
<ul>
{% for series in series_list %}
<li>
<a href="{{ series.get_absolute_url }}">{{ series.name }}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>There are no series in the library.</p>
{% endif %}
{% endblock %}