okay, condition* now works, menu to call them works, just testing it out though, so also a BookForm started but unused at present. Finally, tweaked pagination size to 20 now that navbar takes up so much space, also made pagination choices match
This commit is contained in:
24
templates/condition.html
Normal file
24
templates/condition.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %} {% block main_content %}
|
||||
<h3><center>Condition</center></h3>
|
||||
<div class="container">
|
||||
<right>
|
||||
{% if message|length %}
|
||||
<div class="row alert alert-{{alert}}">
|
||||
{{message}}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<form class="form form-inline col-xl-12" action="" method="POST">
|
||||
{{ wtf.form_field( condition_form.id, form_type='inline' ) }}
|
||||
<div class="col-xl-12">
|
||||
{{ wtf.form_field( condition_form.name, form_type='horizontal', horizontal_columns=('xl', 2, 10), style="width:100%" ) }}
|
||||
</div>
|
||||
<div class="col-xl-12">
|
||||
<br></br>
|
||||
</div>
|
||||
{{ wtf.form_field( condition_form.submit, horizontal_columns=('xl', 2, 2), class="btn btn-primary offset-xl-1 col-xl-2" )}}
|
||||
{{ wtf.form_field( condition_form.delete, horizontal_columns=('xl', 2, 2), class="btn btn-danger offset-xl-1 col-xl-2" )}}
|
||||
</form>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
{% endblock main_content %}
|
||||
15
templates/conditions.html
Normal file
15
templates/conditions.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
<h3>Conditions</h3>
|
||||
<table id="book_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
|
||||
<thead>
|
||||
<tr class="thead-light"><th>Name</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for condition in conditions %}
|
||||
<tr><td data-sort="{{condition.id}}"><a href="{{url_for('condition', id=condition.id )}}">{{condition.name}}</a></td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock main_content %}
|
||||
Reference in New Issue
Block a user