Commit 4d09c613 authored by Ciella's avatar Ciella

Updated bookshelf HTML templates to appropriate specifications

parent 514a5cf9
{% extends "base.html" %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}
Add New Author
{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="form-group row">
<h4>
<label class="col-sm-2 col-form-label">{{ field.label }}:</label>
<div class="fol-sm-10">
{{ field }}
</div>
</h4>
</div>
{% endfor %}
<input type="submit" class="btn btn-lg" value="Add Author">
</form>
{% endblock %}
{% block links %}{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}
Add New Book
{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="form-group row">
<h4>
<label class="col-sm-2 col-form-label">{{ field.label }}:</label>
<div class="col-sm-10">
{{ field }}
</div>
</h4>
</div>
{% endfor %}
<input type="submit" class="btn btn-lg" value="Add Book">
</form>
{% endblock %}
{% block links %}{% endblock %}
\ No newline at end of file
......@@ -5,22 +5,37 @@
{% block header %}{{ object }}{% endblock %}
{% block content %}
<p>{{ object.age }}</p>
<p>{{ object.nationality }}</p>
<p>{{ object.bio }}</p>
<p>Books by {{ object }} I love: </p>
<ul>
{% for book in object.books_published.all %}
<li>
<a href="{{ book.get_absolute_url }}">{{ book }}</a>
</li>
{% endfor %}
</ul>
<br>
<h4 type="text-center">
<p>{{ object.age }}</p>
<p>{{ object.nationality }}</p>
<p>{{ object.bio }}</p>
<p>Books by {{ object }} I love: </p>
<ul>
{% for book in object.books_published.all %}
<li>
<a href="{{ book.get_absolute_url }}">{{ book }}</a>
</li>
{% endfor %}
</ul>
</h4><br>
<button type="button" class="btn btn-lg">
<a href="../edit">Edit Author</a>
</button>
{% endblock %}
{% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/authors/">Authors</a>
<br>
<br>
<p class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/home/">Home</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/books/">Books</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %}
\ No newline at end of file
......@@ -2,19 +2,27 @@
{% block title %}My Favorite Authors{% endblock %}
{% block header %}Ciella's Favorite Authors:{% endblock %}
{% block header %}Ciella's Favorite Authors{% endblock %}
{% block content %}
<ul>
{% for author in object_list %}
<li>
<a href="{{ author.get_absolute_url }}">{{ author }}</a>
</li>
{% endfor %}
</ul>
<h4 class="text-left">
<ul>
{% for author in object_list %}
<li>
<a href="{{ author.get_absolute_url }}">{{ author }}</a>
</li>
{% endfor %}
</ul>
</h4>
{% endblock %}
{% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/books/">Books</a>
<p class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/home/">Home</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/books/">Books</a>
</button>
</p>
{% endblock %}
\ No newline at end of file
......@@ -5,15 +5,31 @@
{% block header %}{{ object }}{% endblock %}
{% block content %}
<p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p>
<p>{{ object.publisher }}</p>
<p>{{ object.year_published }}</p>
<p>{{ object.ISBN }}</p>
<p>{{ object.blurb }}</p>
<br>
<h4 type="text-center">
<p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p>
<p>{{ object.publisher }}</p>
<p>{{ object.year_published }}</p>
<p>{{ object.ISBN }}</p>
<p>{{ object.blurb }}</p>
</h4><br>
<button type="button" class="btn btn-lg">
<a href="../edit">Edit Book</a>
</button>
{% endblock %}
{% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/authors/">Authors</a>
<br>
<br>
<p class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/home/">Home</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/books/">Books</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %}
\ No newline at end of file
......@@ -5,16 +5,24 @@
{% block header %}Ciella's Favorite Books{% endblock %}
{% block content %}
<ul>
{% for book in object_list %}
<li>
<a href="{{ book.get_absolute_url }}">{{ book }}</a>
</li>
{% endfor %}
</ul>
<h4 class="text-left">
<ul>
{% for book in object_list %}
<li>
<a href="{{ book.get_absolute_url }}">{{ book }}</a>
</li>
{% endfor %}
</ul>
</h4>
{% endblock %}
{% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/authors/">Authors</a>
<p class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/home/">Home</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}
Edit Author
{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="form-group row">
<h4>
<label class="col-sm-2 col-form-label">{{ field.label }}:</label>
<div class="col-sm-10">
{{ field }}
</div>
</h4>
</div>
{% endfor %}
<input type="submit" class="btn btn-lg" value="Save Changes">
</form>
{% endblock %}
{% block links %}{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}
Edit Book
{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% for field in form %}
<div class="form-group row">
<h4>
<label class="col-sm-2 col-form-label">{{ field.label }}:</label>
<div class="col-sm-10">
{{ field }}
</div>
</h4>
</div>
{% endfor %}
<input type="submit" class="btn btn-lg" value="Save Changes">
</form>
{% endblock %}
{% block links %}{% endblock %}
\ No newline at end of file
......@@ -5,10 +5,28 @@
{% block header %}Welcome to Ciella's Database of Favorite Books and Authors!{% endblock %}
{% block content %}
Lately, I've been into poetry books, both classical and contemporary. Though before, I've been keen on reading fantasy fiction. I really, really love Soman Chainani and Sylvia Plath!
<br>
<h4 class="text-center">
Lately, I've been into poetry books, both classical and contemporary. Though before, I've been keen on reading fantasy fiction. I really, really love Soman Chainani and Sylvia Plath!
</h4>
<br>
{% endblock %}
{% block links %}
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp;
<a href="/bookshelf/authors/">Authors</a>
<h4 class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/books/">Books</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/authors/">Authors</a>
</button>
</h4>
<h4 class="text-center">
<button type="button" class="btn btn-lg">
<a href="/bookshelf/books/add">Add Book</a>
</button>
<button type="button" class="btn btn-lg">
<a href="/bookshelf/authors/add">Add Author</a>
</button>
</h4>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment