Commit 4d09c613 authored by Ciella's avatar Ciella

Updated bookshelf HTML templates to appropriate specifications

parent 514a5cf9
{% extends "base.html" %} {% extends "base.html" %}
\ No newline at end of file
{% 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" %}
\ No newline at end of file
{% 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 @@ ...@@ -5,22 +5,37 @@
{% block header %}{{ object }}{% endblock %} {% block header %}{{ object }}{% endblock %}
{% block content %} {% block content %}
<p>{{ object.age }}</p> <br>
<p>{{ object.nationality }}</p> <h4 type="text-center">
<p>{{ object.bio }}</p> <p>{{ object.age }}</p>
<p>Books by {{ object }} I love: </p> <p>{{ object.nationality }}</p>
<ul> <p>{{ object.bio }}</p>
{% for book in object.books_published.all %} <p>Books by {{ object }} I love: </p>
<li> <ul>
<a href="{{ book.get_absolute_url }}">{{ book }}</a> {% for book in object.books_published.all %}
</li> <li>
{% endfor %} <a href="{{ book.get_absolute_url }}">{{ book }}</a>
</ul> </li>
{% endfor %}
</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>
<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/books/">Books</a>
</button>
<button type="button" class="btn btn-lg">
<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">
{% for author in object_list %} <ul>
<li> {% for author in object_list %}
<a href="{{ author.get_absolute_url }}">{{ author }}</a> <li>
</li> <a href="{{ author.get_absolute_url }}">{{ author }}</a>
{% endfor %} </li>
</ul> {% endfor %}
</ul>
</h4>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <p class="text-center">
<a href="/bookshelf/books/">Books</a> <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 %} {% 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 %}
<p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p> <br>
<p>{{ object.publisher }}</p> <h4 type="text-center">
<p>{{ object.year_published }}</p> <p><a href='{{ object.author.get_absolute_url }}'>{{ object.author }}</a></p>
<p>{{ object.ISBN }}</p> <p>{{ object.publisher }}</p>
<p>{{ object.blurb }}</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 %} {% 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>
<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/books/">Books</a>
</button>
<button type="button" class="btn btn-lg">
<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">
{% for book in object_list %} <ul>
<li> {% for book in object_list %}
<a href="{{ book.get_absolute_url }}">{{ book }}</a> <li>
</li> <a href="{{ book.get_absolute_url }}">{{ book }}</a>
{% endfor %} </li>
</ul> {% endfor %}
</ul>
</h4>
{% endblock %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/home/">Home</a>&nbsp; &nbsp; &nbsp; &nbsp; <p class="text-center">
<a href="/bookshelf/authors/">Authors</a> <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 %} {% endblock %}
\ No newline at end of file
{% extends "base.html" %} {% extends "base.html" %}
\ No newline at end of file
{% 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" %}
\ No newline at end of file
{% 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 %}
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 %} {% endblock %}
{% block links %} {% block links %}
<a href="/bookshelf/books/">Books</a>&nbsp; &nbsp; &nbsp; &nbsp; <h4 class="text-center">
<a href="/bookshelf/authors/">Authors</a> <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 %} {% 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