updated red_link page

This commit is contained in:
nberting 2018-06-08 17:56:20 +02:00
parent 45800d46e7
commit aa7ad8b450
5 changed files with 26 additions and 23 deletions

View File

@ -124,7 +124,6 @@ class BookSchema(Schema):
stacks = fields.Nested(StackSchema, many=True) stacks = fields.Nested(StackSchema, many=True)
def must_not_be_blank(data): def must_not_be_blank(data):
if not data: if not data:
raise ValidationError('You forgot to write stuff.') raise ValidationError('You forgot to write stuff.')

View File

@ -24,7 +24,7 @@ float: left;
display: block; display: block;
color: black; color: black;
text-align: center; text-align: center;
padding: 14px 16px; padding: 14px 18px;
font-size: 18px; font-size: 18px;
text-decoration: none; text-decoration: none;
} }
@ -41,7 +41,7 @@ font-style: italic;
} }
.container{ .container{
padding: 0px 8px; padding: 0px 10px;
} }

View File

@ -16,10 +16,10 @@
{% endwith %} {% endwith %}
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data> <form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
{{ form.csrf_token }} {{ form.csrf_token }}
<div class="form-group">{{ form.title.label }} {{ form.title(size=20, class="form-control") }}</div> <div class="form-group">Title: {{ form.title (size=34, class="form-control") }}</div>
<br> <br>
<div data-toggle="fieldset" id="phone-fieldset"> <div data-toggle="fieldset" id="phone-fieldset">
{{ form.author.label }} <button type="button" data-toggle="fieldset-add-row" Author(s): <button type="button" data-toggle="fieldset-add-row"
data-target="#phone-fieldset">+</button> data-target="#phone-fieldset">+</button>
<table> <table>
<tr> <tr>
@ -28,20 +28,24 @@
</tr> </tr>
{% for author in form.author %} {% for author in form.author %}
<tr data-toggle="fieldset-entry"> <tr data-toggle="fieldset-entry">
<td>{{ author.author_name }}</td> <td>{{ author.author_name (size=40)}}</td>
<td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td> <td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
</form>
</div>
<br> <br>
<div class="form-group">{{ form.category.label }} {{ form.category(size=20, class="form-control") }}</div> <div sclass="form-group" style="padding-left:10px;">Category: {{ form.category(size=27, class="form-control") }}
<br> <br>
<div class="form-group">{{ form.year_published.label }} {{ form.year_published(size=4, class="form-control") }}</div>
<br> <br>
{{ form.file }} {{ form.file }}
{{ form.upload }} {{ form.upload }}
{{ form.wish }} {{ form.wish }}
</div>
</form> </form>
</div> </div>

View File

@ -1,12 +1,8 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Red link page{% endblock %}
{% block css %} {% block css %}
<style type="text/css"> <style type="text/css">
body{
padding-top: 20px;
}
h1, p{ h1, p{
text-align:left; text-align:left;
} }
@ -21,11 +17,9 @@
</style> </style>
{% endblock %} {% endblock %}
{% block header %}{% endblock %}
{% block main %} {% block main %}
<h1>Nothing in the library yet with: {{ title }}</h1> <h1>Nothing in the library yet with: {{ title }}</h1>
<h2>Add this potential book:</h2> <br>
<div class="container"> <div class="container">
{% with messages = get_flashed_messages() %} {% with messages = get_flashed_messages() %}
{% if messages %} {% if messages %}
@ -38,13 +32,19 @@
</div> </div>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<div style="width: 200px:" <div style="width: 220px; float: left; padding-right: 40px;">
<img class="no_cover" width="220" src = '/static/img/default_cover.gif';">
</div>
<br>
<div>
<h2>Add this potential book:</h2>
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data> <form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
{{ form.csrf_token }} {{ form.csrf_token }}
<div class="form-group">{{ form.title.label }} {{ form.title(size=20, class="form-control") }}</div> <div class="form-group">Title: {{ form.title (size=34, class="form-control") }}</div>
<br> <br>
<div data-toggle="fieldset" id="phone-fieldset"> <div data-toggle="fieldset" id="phone-fieldset">
{{ form.author.label }} <button type="button" data-toggle="fieldset-add-row" Author(s): <button type="button" data-toggle="fieldset-add-row"
data-target="#phone-fieldset">+</button> data-target="#phone-fieldset">+</button>
<table> <table>
<tr> <tr>
@ -53,14 +53,17 @@
</tr> </tr>
{% for author in form.author %} {% for author in form.author %}
<tr data-toggle="fieldset-entry"> <tr data-toggle="fieldset-entry">
<td>{{ author.author_name }}</td> <td>{{ author.author_name (size=40)}}</td>
<td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td> <td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
</form>
</div>
<br>
<div class="form-group">Category: {{ form.category(size=27, class="form-control") }}</div>
<br> <br>
<div class="form-group">{{ form.category.label }} {{ form.category(size=20, class="form-control") }}</div>
{{ form.file }} {{ form.file }}
{{ form.upload }} {{ form.upload }}
{{ form.wish }} {{ form.wish }}

View File

@ -1,10 +1,7 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block main %} {% block main %}
<div class="container"> <div class="container">
{% from "_formhelpers.html" import render_field %} {% from "_formhelpers.html" import render_field %}
<form method="POST"> <form method="POST">
<div>{{ form.select(style="width: 100px; margin: 10px; float: left; font-size: 20px") }}</div> <div>{{ form.select(style="width: 100px; margin: 10px; float: left; font-size: 20px") }}</div>