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.

94 lines
2.6 KiB
HTML

7 years ago
{% extends 'base.html' %}
{% block main %}
<div class="container" style="float: left; width:50%;">
<div style="width: 98%; border-right: dashed; border-width: 1px;">
7 years ago
<h1 class="page-header">Add Book</h1>
{% 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 %}
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
{{ form.csrf_token }}
<div class="form-group">Title: {{ form.title (size=34, class="form-control") }}</div>
<br>
<div data-toggle="fieldset" id="phone-fieldset">
7 years ago
Author(s): <button type="button" data-toggle="fieldset-add-row data-target="#phone-fieldset">+</button>
<table>
<tr>
<th></th>
<th></th>
</tr>
{% for author in form.author %}
<tr data-toggle="fieldset-entry">
<td>{{ author.author_name (size=40)}}</td>
<td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td>
</tr>
{% endfor %}
</table>
</div>
<br>
7 years ago
Category: {{ form.category(size=27, class="form-control") }}
7 years ago
<br>
<br>
7 years ago
Year published: {{ form.year_published(size=8, class="form-control") }}
<br>
<br>
<div style="width: 40%;">
Add a message for future readers: {{ form.message(size=90, class="form-control") }}
<br></div>
7 years ago
<br>
7 years ago
{{ form.file }}
7 years ago
{{ form.upload }}
{{ form.wish }}
</div>
7 years ago
</form>
</div>
<div>
<table class="library_table" id="table" style="width:30% padding:10px;" >
<thead>
<tr id="header" style="height:15px;">
<th style="width: 10%;"> <h5> Currently in the library </h5></th>
<th style="width: 20%;"></th>
</tr>
</thead>
<tbody>
<tr>
<td> Titles: </td>
<td> {{ books_all }}</td>
</tr>
<tr>
<td> Authors: </td>
<td> {{ authors_all }} </td>
</tr>
<tr>
<td> Categories: </td>
<td> {{ categories|replace('[', '')|replace(']', '') }}</td>
</tr>
<tr>
<td> Stacks: </td>
<td> {{ stacks_all|replace('[', '')|replace(']', '') }}</td>
</tr>
<tr>
<td> From the years: </td>
<td> {{earliest}} {{latest}}</td>
</tr>
<tr>
<td> Gaps in the collection: </td>
<td> At least {{ books_potential }} potential books missing</td>
</tr>
7 years ago
</tbody>
</table>
</div>
7 years ago
</div>
{% endblock %}