2018-05-23 14:18:38 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block css %}
|
|
|
|
<style type="text/css">
|
|
|
|
h1, p{
|
2018-06-08 17:09:04 +02:00
|
|
|
text-align:left;
|
2018-05-23 14:18:38 +02:00
|
|
|
}
|
|
|
|
h1{
|
|
|
|
font-size:44px;
|
2018-06-08 17:09:04 +02:00
|
|
|
margin:40px 0 30px;
|
2018-05-23 14:18:38 +02:00
|
|
|
}
|
|
|
|
p{
|
|
|
|
font-size:14px;
|
|
|
|
margin:15px 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block main %}
|
2018-06-08 17:09:04 +02:00
|
|
|
<h1>Nothing in the library yet with: {{ title }}</h1>
|
2018-06-08 17:56:20 +02:00
|
|
|
<br>
|
2018-05-31 18:26:22 +02:00
|
|
|
<div class="container">
|
|
|
|
{% with messages = get_flashed_messages() %}
|
|
|
|
{% if messages %}
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<ul>
|
|
|
|
{% for message in messages %}
|
|
|
|
<li>{{ message }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2018-06-08 17:56:20 +02:00
|
|
|
<div style="width: 220px; float: left; padding-right: 40px;">
|
2018-06-09 14:27:43 +02:00
|
|
|
<img class="no_cover" width="220" src = '/static/img/default_cover.gif';>
|
2018-06-08 17:56:20 +02:00
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div>
|
|
|
|
<h2>Add this potential book:</h2>
|
|
|
|
|
2018-05-31 18:26:22 +02:00
|
|
|
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
|
|
|
|
{{ form.csrf_token }}
|
2018-06-08 17:56:20 +02:00
|
|
|
<div class="form-group">Title: {{ form.title (size=34, class="form-control") }}</div>
|
2018-05-31 18:26:22 +02:00
|
|
|
<br>
|
|
|
|
<div data-toggle="fieldset" id="phone-fieldset">
|
2018-06-08 17:56:20 +02:00
|
|
|
Author(s): <button type="button" data-toggle="fieldset-add-row"
|
2018-05-31 18:26:22 +02:00
|
|
|
data-target="#phone-fieldset">+</button>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
{% for author in form.author %}
|
|
|
|
<tr data-toggle="fieldset-entry">
|
2018-06-08 17:56:20 +02:00
|
|
|
<td>{{ author.author_name (size=40)}}</td>
|
2018-05-31 18:26:22 +02:00
|
|
|
<td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
2018-06-08 17:56:20 +02:00
|
|
|
</div>
|
2018-06-09 15:41:21 +02:00
|
|
|
<div style="padding-left:10px;">
|
|
|
|
Category: {{ form.category(size=27, class="form-control") }}
|
2018-06-08 17:56:20 +02:00
|
|
|
<br>
|
2018-06-09 15:41:21 +02:00
|
|
|
<br>
|
|
|
|
Year published: {{ form.year_published(size=8, class="form-control") }}
|
2018-05-31 18:26:22 +02:00
|
|
|
<br>
|
|
|
|
{{ form.file }}
|
2018-05-31 18:34:50 +02:00
|
|
|
{{ form.upload }}
|
|
|
|
{{ form.wish }}
|
2018-05-31 18:26:22 +02:00
|
|
|
</form>
|
2018-06-08 17:09:04 +02:00
|
|
|
<p><a href="{{ url_for('home') }}">go back home</a>?</p>
|
2018-05-31 18:26:22 +02:00
|
|
|
</div>
|
2018-05-23 14:18:38 +02:00
|
|
|
{% endblock %}
|