You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB
HTML

{% 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 class="library_table" style="width:100%">
<tr>
<th>Cover</th>
<th>Title</th>
<th>Author</th>
<th>Filetype</th>
<th>Category</th>
</tr>
{% for book in books|sort(attribute='title', reverse = False) %}
<tr>
<td><img src="../uploads/cover/{{ book.cover }}" width="80"></td>
<td class="title_col"><a href="books/{{ book.id }}">{{ book.title }}</a></td>
<td class="author_col"> {% for author in book.authors %}
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
{% endfor %}</td>
<td>{{ book.fileformat }}</td>
<td>{{ book.category}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}