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.
XPPL/app/templates/show_books.html

95 lines
2.5 KiB
HTML

7 years ago
{% extends 'base.html' %}
{% block main %}
<div class="container">
7 years ago
{% from "_formhelpers.html" import render_field %}
7 years ago
<form method="POST">
<div>{{ form.select(style="width: 100px; margin: 10px; float: left; font-size: 20px") }}</div>
7 years ago
<div class="search">
{{ render_field(form.search) }} </div>
<button type="submit" @click="sendMessage" class="button is-info" >find</button>
<p><br>
</form>
7 years ago
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%">
7 years ago
<thead>
7 years ago
<tr id="header">
<th width="70px;">Cover</th>
7 years ago
<th>Title</th>
<th width="400px;">Author</th>
<th width="100px;">Year</th>
<th width="100px;">Category</th>
<th width="100px;">Stack</th>
{%if light%}
{%else%}
<th width="100px;">Add to a stack</th>
{%endif%}
7 years ago
</tr>
7 years ago
</thead>
<tbody>
{% for book in books %}
7 years ago
<tr>
<td style= "padding: 5px;">
7 years ago
<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';">
7 years ago
<!-- <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 id='fileformat'>{{ book.year_published or ''}}</td>
7 years ago
<td>{{ book.category}}</td>
<td id='ascii'>
7 years ago
{% for stack in book.stacks %}
7 years ago
<li><a href="{{url_for('show_stack_by_id', id=stack.id)}}"> {{ stack.stack_name }} </a></li>
{% else %}
<li style='font-size:10px;'>
XXXXXXXXXX <br>
XXXXXXXXXX <br>
XXXXXXXXXX <br>
7 years ago
{% endfor %}
</td>
{%if light%}
{%else%}
<td id='plus'><a href="{{url_for('add_to_stack', id=book.id)}}">
===>
</a></td>{%endif%}
7 years ago
</tr>
7 years ago
{% endfor %}
7 years ago
</tbody>
7 years ago
</table>
</div>
{% endblock %}