Commit 4d09c613 authored by Ciella's avatar Ciella

Updated bookshelf HTML templates to appropriate specifications

parent 514a5cf9
{% extends "base.html" %} {% 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" %} {% 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,6 +5,8 @@ ...@@ -5,6 +5,8 @@
{% block header %}{{ object }}{% endblock %} {% block header %}{{ object }}{% endblock %}
{% block content %} {% block content %}
<br>
<h4 type="text-center">
<p>{{ object.age }}</p> <p>{{ object.age }}</p>
<p>{{ object.nationality }}</p> <p>{{ object.nationality }}</p>
<p>{{ object.bio }}</p> <p>{{ object.bio }}</p>
...@@ -16,11 +18,24 @@ ...@@ -16,11 +18,24 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</h4><br>
<button type="button" class="btn btn-lg">
<a href="../edit">Edit Author</a>
</button>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <br>
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp; <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> <a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -2,19 +2,27 @@ ...@@ -2,19 +2,27 @@
{% block title %}My Favorite Authors{% endblock %} {% block title %}My Favorite Authors{% endblock %}
{% block header %}Ciella's Favorite Authors:{% endblock %} {% block header %}Ciella's Favorite Authors{% endblock %}
{% block content %} {% block content %}
<ul> <h4 class="text-left">
<ul>
{% for author in object_list %} {% for author in object_list %}
<li> <li>
<a href="{{ author.get_absolute_url }}">{{ author }}</a> <a href="{{ author.get_absolute_url }}">{{ author }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</h4>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <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> <a href="/bookshelf/books/">Books</a>
</button>
</p>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,15 +5,31 @@ ...@@ -5,15 +5,31 @@
{% block header %}{{ object }}{% endblock %} {% block header %}{{ object }}{% endblock %}
{% block content %} {% block content %}
<br>
<h4 type="text-center">
<p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p> <p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p>
<p>{{ object.publisher }}</p> <p>{{ object.publisher }}</p>
<p>{{ object.year_published }}</p> <p>{{ object.year_published }}</p>
<p>{{ object.ISBN }}</p> <p>{{ object.ISBN }}</p>
<p>{{ object.blurb }}</p> <p>{{ object.blurb }}</p>
</h4><br>
<button type="button" class="btn btn-lg">
<a href="../edit">Edit Book</a>
</button>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <br>
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp; <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> <a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,16 +5,24 @@ ...@@ -5,16 +5,24 @@
{% block header %}Ciella's Favorite Books{% endblock %} {% block header %}Ciella's Favorite Books{% endblock %}
{% block content %} {% block content %}
<ul> <h4 class="text-left">
<ul>
{% for book in object_list %} {% for book in object_list %}
<li> <li>
<a href="{{ book.get_absolute_url }}">{{ book }}</a> <a href="{{ book.get_absolute_url }}">{{ book }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</h4>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <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> <a href="/bookshelf/authors/">Authors</a>
</button>
</p>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends "base.html" %} {% 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" %} {% 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 @@ ...@@ -5,10 +5,28 @@
{% block header %}Welcome to Ciella's Database of Favorite Books and Authors!{% endblock %} {% block header %}Welcome to Ciella's Database of Favorite Books and Authors!{% endblock %}
{% block content %} {% block content %}
<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! 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 %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp; <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> <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 %} {% 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