2018-05-20 00:10:01 +02:00
|
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
|
<div class="container">
|
2018-05-31 18:26:22 +02:00
|
|
|
|
{% from "_formhelpers.html" import render_field %}
|
2018-06-11 16:56:34 +02:00
|
|
|
|
|
2018-05-31 18:26:22 +02:00
|
|
|
|
<form method="POST">
|
2018-06-01 17:20:12 +02:00
|
|
|
|
<div>{{ form.select(style="width: 100px; margin: 10px; float: left; font-size: 20px") }}</div>
|
2018-05-31 18:26:22 +02:00
|
|
|
|
<div class="search">
|
|
|
|
|
{{ render_field(form.search) }} </div>
|
2018-06-08 16:15:09 +02:00
|
|
|
|
<button type="submit" @click="sendMessage" class="button is-info" >browse</button>
|
|
|
|
|
|
2018-06-07 19:10:56 +02:00
|
|
|
|
<p><br>
|
2018-06-07 23:33:22 +02:00
|
|
|
|
{{ form.grid(style="font-size:20px")}}{{ form.listview(style="font-size:20px")}}</p>
|
2018-06-07 19:10:56 +02:00
|
|
|
|
</form>
|
2018-05-31 18:26:22 +02:00
|
|
|
|
|
2018-05-20 00:10:01 +02:00
|
|
|
|
<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 %}
|
|
|
|
|
|
2018-05-29 16:18:00 +02:00
|
|
|
|
<table class="library_table" id="table" style="width:100%">
|
2018-06-02 00:20:54 +02:00
|
|
|
|
<thead>
|
2018-05-29 16:18:00 +02:00
|
|
|
|
<tr id="header">
|
2018-06-07 23:33:22 +02:00
|
|
|
|
<th width="70px;">Cover</th>
|
2018-05-20 00:10:01 +02:00
|
|
|
|
<th>Title</th>
|
2018-06-07 19:10:56 +02:00
|
|
|
|
<th width="400px;">Author</th>
|
2018-06-09 18:13:18 +02:00
|
|
|
|
<th width="100px;">Year</th>
|
2018-06-07 19:10:56 +02:00
|
|
|
|
<th width="100px;">Category</th>
|
|
|
|
|
<th width="100px;">Stack</th>
|
2018-06-12 13:17:02 +02:00
|
|
|
|
{%if light%}
|
|
|
|
|
{%else%}
|
2018-06-09 15:27:49 +02:00
|
|
|
|
<th width="100px;">Add to a stack</th>
|
2018-06-12 13:17:02 +02:00
|
|
|
|
{%endif%}
|
2018-05-20 00:10:01 +02:00
|
|
|
|
</tr>
|
2018-06-02 00:20:54 +02:00
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2018-06-07 23:33:22 +02:00
|
|
|
|
{% for book in books %}
|
2018-05-20 00:10:01 +02:00
|
|
|
|
<tr>
|
2018-06-07 19:10:56 +02:00
|
|
|
|
<td style= "padding: 5px;">
|
2018-05-31 20:06:13 +02:00
|
|
|
|
|
2018-06-13 20:29:25 +02:00
|
|
|
|
<img class="no_cover" id="{{ book.title }}" src="/cover/{{ book.cover }}" width="70" onerror="if (this.src != '/cover/{{ book.cover }}') this.src = '/static/img/default_cover.png';">
|
2018-05-31 20:06:13 +02:00
|
|
|
|
<!-- <object class="no_cover" data="../static/img/default_cover.png" type="image/png" width="65">
|
|
|
|
|
<p hidden="True"></p>
|
|
|
|
|
|
|
|
|
|
</object>-->
|
2018-05-27 22:32:17 +02:00
|
|
|
|
</td>
|
2018-05-27 22:11:35 +02:00
|
|
|
|
<td class="title_col"><a href="books/{{ book.id }}">{{ book.title }}</a></td>
|
2018-05-23 14:42:52 +02:00
|
|
|
|
|
2018-05-27 22:11:35 +02:00
|
|
|
|
<td class="author_col"> {% for author in book.authors %}
|
2018-05-23 14:12:24 +02:00
|
|
|
|
|
2018-05-23 17:50:01 +02:00
|
|
|
|
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
|
2018-05-23 14:12:24 +02:00
|
|
|
|
|
|
|
|
|
{% endfor %}</td>
|
2018-06-09 19:27:55 +02:00
|
|
|
|
<td id='fileformat'>{{ book.year_published or '––'}}</td>
|
2018-05-27 22:11:35 +02:00
|
|
|
|
<td>{{ book.category}}</td>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
<td id='ascii'>
|
2018-06-09 14:27:43 +02:00
|
|
|
|
{% for stack in book.stacks %}
|
|
|
|
|
|
2018-06-11 12:25:10 +02:00
|
|
|
|
<li><a href="{{url_for('show_stack_by_id', id=stack.id)}}"> {{ stack.stack_name }} </a></li>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
{% else %}
|
|
|
|
|
<li style='font-size:10px;'>
|
|
|
|
|
|
2018-06-11 17:57:22 +02:00
|
|
|
|
XXXXXXXXXX <br>
|
|
|
|
|
XXXXXXXXXX <br>
|
|
|
|
|
XXXXXXXXXX <br>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
|
2018-06-09 14:27:43 +02:00
|
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
2018-05-31 18:04:05 +02:00
|
|
|
|
|
2018-06-03 23:33:16 +02:00
|
|
|
|
</td>
|
2018-06-12 13:17:02 +02:00
|
|
|
|
{%if light%}
|
|
|
|
|
{%else%}
|
|
|
|
|
|
2018-06-07 10:46:14 +02:00
|
|
|
|
<td id='plus'><a href="{{url_for('add_to_stack', id=book.id)}}">
|
2018-06-03 23:33:16 +02:00
|
|
|
|
|
2018-06-07 19:10:56 +02:00
|
|
|
|
===>
|
2018-06-12 13:17:02 +02:00
|
|
|
|
</a></td>{%endif%}
|
2018-05-20 00:10:01 +02:00
|
|
|
|
</tr>
|
2018-05-31 18:04:05 +02:00
|
|
|
|
|
2018-05-20 00:10:01 +02:00
|
|
|
|
{% endfor %}
|
2018-06-02 00:20:54 +02:00
|
|
|
|
</tbody>
|
2018-05-20 00:10:01 +02:00
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|