2018-05-29 16:18:00 +02:00
|
|
|
{% 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 %}
|
|
|
|
|
|
|
|
|
|
|
|
{% for book in books|sort(attribute='title', reverse = False) %}
|
|
|
|
<a href="books/{{ book.id }}">
|
2018-05-31 20:06:13 +02:00
|
|
|
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" width="140" onerror="if (this.src != '../static/img/default_cover.png') this.src = '../static/img/default_cover.png';"><!--{{ book.title }}--></a>
|
2018-05-29 16:18:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|