xppl/app/templates/show_books.html

34 lines
674 B
HTML
Raw Normal View History

2018-05-20 00:10:01 +02:00
{% extends 'base.html' %}
{% block main %}
<div class="container">
<h1 class="page-header">All Books</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-success">
<ul>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}
<table style="width:100%">
<tr>
<th>Title</th>
<th>Author</th>
</tr>
{% for book in books %}
<tr>
<td><a href="books/{{ book.id }}">{{ book.title }}</a></td>
<td>{{ book.author }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}