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.

68 lines
1.9 KiB
HTML

7 years ago
{% extends 'base.html' %}
{% block main %}
<div class="container">
7 years ago
{% from "_formhelpers.html" import render_field %}
<form method="POST">
<div class="search">
{{ render_field(form.search) }} </div>
<button type="submit" class="button">Search</button>
</form>
7 years ago
<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 %}
7 years ago
<table class="library_table" id="table" style="width:100%">
<tr id="header">
<th>Cover</th>
7 years ago
<th>Title</th>
<th>Author</th>
<th>Filetype</th>
7 years ago
<th>Category</th>
<th>Stack</th>
7 years ago
</tr>
7 years ago
{% for book in books|sort(attribute='title', reverse = False) %}
7 years ago
<tr>
<td>
7 years ago
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" width="40" onerror="if (this.src != '../static/img/default_cover.png') this.src = '../static/img/default_cover.png';">
<!-- <object class="no_cover" data="../static/img/default_cover.png" type="image/png" width="65">
<p hidden="True"></p>
</object>-->
</td>
7 years ago
<td class="title_col"><a href="books/{{ book.id }}">{{ book.title }}</a></td>
7 years ago
<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>
7 years ago
<td>{{ book.category}}</td>
<td> {% for stack in book.stacks %}
<li><a href="{{url_for('show_stack_by_id', id=stack.id)}}">{{ stack.stack_name }}</a> </li>
{% endfor %}
</td>
7 years ago
</tr>
7 years ago
{% endfor %}
</table>
</div>
{% endblock %}