bookshelf-management/bookshelf_management/apps/mgmt/templates/bookshelf.html

35 lines
1.1 KiB
HTML
Raw Normal View History

2020-12-21 22:30:38 +00:00
{% extends "generic_template.html" %}
{% block content %}
2021-01-13 22:52:23 +00:00
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
2020-12-21 22:30:38 +00:00
<h1>{{bookshelf}}</h1>
<h2>Bookshelf</h2>
<strong>Number of Books in Bookshelf:</strong> <p>{{ total }}</p>
2021-01-13 22:52:23 +00:00
<form action="/bookshelves/{{bookshelfId}}" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="Add Book">
</form>
2021-02-12 01:05:08 +00:00
<p>Or search for a book to add <a href="/bookshelves/{{bookshelfId}}/search">here</a></p>
2021-01-13 22:52:23 +00:00
2020-12-21 22:30:38 +00:00
<h1>Book List</h1>
{% if books %}
<ul>
{% for book in books %}
2021-01-13 22:52:23 +00:00
<li class="bookshelf-entry" id="book-{{ book.id }}">
2020-12-21 22:30:38 +00:00
<a href="https://www.gutenberg.org/ebooks/{{ book.id }}">{{ book.title }}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>There are no books in the bookshelf.</p>
{% endif %}
2021-01-13 22:52:23 +00:00
{% load static %}
<script src="{% static 'booklist.js' %}"></script>
<link rel="stylesheet" href="{% static 'style.css' %}"></script>
2020-12-21 22:30:38 +00:00
{% endblock %}