This commit is contained in:
MassiveAtoms
2020-07-14 19:12:21 -03:00
34 changed files with 275 additions and 353 deletions

View File

@ -1,17 +1,17 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>{{author}}</h1>
<table id="books">
<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 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>
<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>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>Author List</h1>
{% if author_list %}
<ul>

View File

@ -2,49 +2,60 @@
{% block content %}
{% load static %}
<h1>{{book.title}} by
{% if book.authors %}
{% for author in book.authors.all %}
<a href="{{author.get_absolute_url}}">{{author.name}}</a>
{%endfor%}
{% else %}
{{book.author_sort}}
{%endif%}
Published by
{% if book.publishers %}
{% for pub in book.publishers.all %}
<a href="{{pub.get_absolute_url}}">{{pub.name}}</a>
{%endfor%}
{% else %}
Unknown
{%endif%}
Tags:
{% if book.tags %}
{% for tag in book.tags.all %}
<a href="{{tag.get_absolute_url}}">{{tag.name}}</a>,
{%endfor%}
{% else %}
{%endif%}
Rating:
{% if book.ratings %}
{% for rating in book.ratings.all %}
<a href="{{rating.get_absolute_url}}">{{rating}}</a>
{%endfor%}
{% else %}
{%endif%}
<a href="{{book.publisher.get_absolute_url}}">{{book.publisher}}</a>
</h1>
<a href="{% static "" %}{{download}}"><img src="{% static "" %}{{imgpath}}" alt="download" srcset=""></a>
<div class="col s12 m7">
<div class="card z-depth-0 horizontal">
<div class="card-image">
<a style="padding-top:15%" href="{{download}}"><img src=" {% static "" %}{{imgpath}}" alt="download" srcset=""></a>
</div>
<div class="card-stacked">
<div class="card-content">
<h1> {{book.title}}</h1>
<h4> by
{% if book.authors %}
{% for author in book.authors.all %}
<a href="{{author.get_absolute_url}}">{{author.name}}</a>
{%endfor%}
{% else %}
{{book.author_sort}}
{%endif%}
<br>
Published by
{% if book.publishers %}
{% for pub in book.publishers.all %}
<a href="{{pub.get_absolute_url}}">{{pub.name}}</a>
{%endfor%}
{% else %}
Unknown
{%endif%}
<br>
Tags:
{% if book.tags %}
{% for tag in book.tags.all %}
<a href="{{tag.get_absolute_url}}">{{tag.name}}</a>,
{%endfor%}
{% else %}
{%endif%}
<br>
Rating:
{% if book.ratings %}
{% for rating in book.ratings.all %}
<a href="{{rating.get_absolute_url}}">{{rating}}</a>
{%endfor%}
{% else %}
{%endif%}
<br>
<a href="{{book.publisher.get_absolute_url}}">{{book.publisher}}</a>
</h4>
</div>
</div>
</div>
</div>
<div class="container">
{% autoescape off %}
{{comment}}
{% endautoescape %}
</div>
{% endblock %}

View File

@ -1,17 +1,21 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>Book List</h1>
<table id="books">
<h1 class="center">Book List</h1>
<div class="row">
<div class="col s1 m0">
</div>
<div class="col s10 m12">
<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 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>
<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 book_list %}
<tr>
@ -30,11 +34,8 @@
</tr>
{% endfor %}
</table>
<div class="col s1 m0">
</div>
</div>
{% endblock %}

View File

@ -1,18 +1,18 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>{{publisher}} </h1>
{% if publisher.released %}
<table id="books">
<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 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>
<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>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>Publishers List</h1>
{% if publisher_list %}
<ul>

View File

@ -1,18 +1,17 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>{{rating}}</h1>
<h1 class="left">Books with rating: {{rating}}</h1>
{% if books %}
<table id="books">
<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 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>
<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>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>Ratings List</h1>
{% if rating_list %}
<ul>

View File

@ -1,18 +1,17 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>{{tag}}</h1>
{% if books %}
<table id="books">
<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 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>
<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>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
{% load static %}
<h1>Tags List</h1>
{% if tag_list %}
<ul>