diff --git a/app/templates/book/all.html b/app/templates/book/all.html new file mode 100644 index 0000000..29d3d7c --- /dev/null +++ b/app/templates/book/all.html @@ -0,0 +1,102 @@ + +{% extends 'base.html' %} +{% block content %} + +
+ +
+ +

Books

+
+ + {% for book in books %} + +
+ +
{{book.owner.username}}/{{book.label}}
+
+ {% if book.versions %} +

Last updated on {{book.versions[-1].updated_at.strftime('%B %d, %Y')}}

+ {% endif %} + +
+ + +

{{ book.stars|length }}

+
+ + +

55

+
+ + +

55

+
+
+
+
+
+ {% endfor %} + + {% if page.pages > 1 %} +
+ +
+ {% endif %} +
+ + +{% include 'book/add_book_modal.html' %} + +{% endblock %} + +{% block scripts %} +{% endblock %} diff --git a/app/views/book.py b/app/views/book.py index 5edb824..e2946f5 100644 --- a/app/views/book.py +++ b/app/views/book.py @@ -25,7 +25,7 @@ def get_all(): pagination = create_pagination(total=books.count()) return render_template( - "book/index.html", + "book/all.html", books=books.paginate(page=pagination.page, per_page=pagination.per_page), page=pagination, search_query=q,