78 lines
2.3 KiB
HTML
Executable File
78 lines
2.3 KiB
HTML
Executable File
{% extends 'base.html' %}
|
|
|
|
{% block main %}
|
|
<div class="container">
|
|
{% from "_formhelpers.html" import render_field %}
|
|
<form method="POST">
|
|
<div>{{ form.select(style="width: 100px; margin: 10px; float: left; font-size: 20px") }}</div>
|
|
<div class="search">
|
|
{{ render_field(form.search) }} </div>
|
|
<button type="submit" class="button">browse</button>
|
|
<p><br>
|
|
{{ form.grid(style="font-size:20px")}}{{ form.listview(style="font-size:20px")}}</p>
|
|
</form>
|
|
|
|
<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" id="table" style="width:100%">
|
|
<thead>
|
|
<tr id="header">
|
|
<th>Cover</th>
|
|
<th>Title</th>
|
|
<th width="400px;">Author</th>
|
|
<th width="100px;">Filetype</th>
|
|
<th width="100px;">Category</th>
|
|
<th width="100px;">Stack</th>
|
|
<th width="100px;">Add to stack</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for book in books|sort(attribute='title', reverse = False) %}
|
|
<tr>
|
|
<td style= "padding: 5px;">
|
|
|
|
<img class="no_cover" id="{{ book.title }}" src="/uploads/cover/{{ book.cover }}" width="80" onerror="if (this.src != '//uploads/cover/{{ book.cover }}') this.src = '/static/img/default_cover.gif';">
|
|
<!-- <object class="no_cover" data="../static/img/default_cover.png" type="image/png" width="65">
|
|
<p hidden="True"></p>
|
|
|
|
</object>-->
|
|
</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>
|
|
<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>
|
|
<td id='plus'><a href="{{url_for('add_to_stack', id=book.id)}}">
|
|
|
|
===>
|
|
</a></td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
{% endblock %}
|