beautified it

This commit is contained in:
MassiveAtoms
2020-07-08 13:22:37 -03:00
parent 73f6937c78
commit 0ab703f8b9
13 changed files with 342 additions and 349 deletions

View File

@ -3,15 +3,33 @@
{% block content %}
{% load static %}
<h1>{{authors}}</h1>
{% if books %}
<ul>
{% for book in books %}
<li><a href="{{book.get_absolute_url}}">{{book.title}}</a></li>
{%endfor%}
</ul>
{% else %}
{%endif%}
<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:-->
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Author</th>
<th onclick="sortTable(2)">Rating</th>
<th onclick="sortTable(3)">Tags</th>
<th 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.ratings.all %}
{{rating}}
{% endfor %}
</td>
<td>
{% for tag in book.tags.all %}
{{tag}},
{% endfor %}
</td>
<td>{{book.timestamp}}</td>
</tr>
{% endfor %}
</table>

View File

@ -2,16 +2,39 @@
{% block content %}
{% load static %}
<h1>Book List</h1>
{% if books_list %}
<ul>
{% for book in books_list %}
<li>
<a href="{{ book.get_absolute_url }}">{{ book.title }}</a> ({{book.author_sort}})
</li>
{% endfor %}
</ul>
{% else %}
<p>There are no books in the library.</p>
{% endif %}
<h1>Book List</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:-->
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Author</th>
<th onclick="sortTable(2)">Rating</th>
<th onclick="sortTable(3)">Tags</th>
<th onclick="sortTable(4)">Added</th>
</tr>
{% for book in books_list %}
<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 %}

View File

@ -2,17 +2,37 @@
{% block content %}
{% load static %}
<h1>{{authors}} </h1>
<h1>{{publishers}} </h1>
{% if publishers.released %}
<ul>
{% for book in publishers.released.all %}
<li><a href="{{book.get_absolute_url}}">{{book.title}}</a></li>
{%endfor%}
</ul>
{% else %}
{%endif%}
{% if publishers.released %}
<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:-->
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Author</th>
<th onclick="sortTable(2)">Rating</th>
<th onclick="sortTable(3)">Tags</th>
<th onclick="sortTable(4)">Added</th>
</tr>
{% for book in publishers.released.all %}
<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>
{% else %}
{%endif%}
{% endblock %}

View File

@ -4,15 +4,35 @@
{% load static %}
<h1>{{ratings}}</h1>
{% if books %}
<ul>
{% for book in books %}
<li><a href="{{book.get_absolute_url}}">{{book.title}}</a></li>
{%endfor%}
</ul>
{% else %}
{%endif%}
{% if books %}
<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:-->
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Author</th>
<th onclick="sortTable(2)">Rating</th>
<th onclick="sortTable(3)">Tags</th>
<th 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.ratings.all %}
{{rating}}
{% endfor %}
</td>
<td>
{% for tag in book.tags.all %}
{{tag}},
{% endfor %}
</td>
<td>{{book.timestamp}}</td>
</tr>
{% endfor %}
</table>
{% else %}
{%endif%}

View File

@ -4,15 +4,35 @@
{% load static %}
<h1>{{tags}}</h1>
{% if books %}
<ul>
{% for book in books %}
<li><a href="{{book.get_absolute_url}}">{{book.title}}</a></li>
{%endfor%}
</ul>
{% else %}
{%endif%}
{% if books %}
<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:-->
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Author</th>
<th onclick="sortTable(2)">Rating</th>
<th onclick="sortTable(3)">Tags</th>
<th 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.ratings.all %}
{{rating}}
{% endfor %}
</td>
<td>
{% for tag in book.tags.all %}
{{tag}},
{% endfor %}
</td>
<td>{{book.timestamp}}</td>
</tr>
{% endfor %}
</table>
{% else %}
{%endif%}