Improving listing layout.
This commit is contained in:
parent
ce7d092be4
commit
8d26d5b084
3 changed files with 9 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ def init_listing_routes(app):
|
||||||
limit_qs = request.args.get("limit")
|
limit_qs = request.args.get("limit")
|
||||||
page = int(request.args.get("page", 1) or 1)
|
page = int(request.args.get("page", 1) or 1)
|
||||||
per_page = int(per_page_qs) if (per_page_qs and per_page_qs.isdigit()) else (
|
per_page = int(per_page_qs) if (per_page_qs and per_page_qs.isdigit()) else (
|
||||||
int(limit_qs) if (limit_qs and limit_qs.isdigit()) else 15
|
int(limit_qs) if (limit_qs and limit_qs.isdigit()) else 18
|
||||||
)
|
)
|
||||||
sort = request.args.get("sort")
|
sort = request.args.get("sort")
|
||||||
fields_qs = request.args.get("fields")
|
fields_qs = request.args.get("fields")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="table-responsive" style="max-height: 80vh;">
|
<div class="table-responsive" style="max-height: 80vh;">
|
||||||
<table class="table table-info table-striped table-hover table-bordered border-tertiary text-nowrap overflow-x-auto mx-auto">
|
<table class="table table-sm table-info table-striped table-hover table-bordered border-tertiary text-nowrap overflow-x-auto mx-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% for col in columns %}
|
{% for col in columns %}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,13 @@ Inventory Manager - {{ model|title }} Listing
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="mx-5">
|
<div class="mx-5">
|
||||||
<h1 class="display-4 text-center mt-2">{{ model|title }} Listing</h1>
|
<div class="d-flex justify-content-between">
|
||||||
<div class="btn-group">
|
<div class="btn-group h-50 align-self-end">
|
||||||
<button type="button" class="btn btn-primary mb-3"
|
<button type="button" class="btn btn-primary mb-2"
|
||||||
onclick="location.href='{{ url_for('entry.entry_new', model=model) }}'">New</button>
|
onclick="location.href='{{ url_for('entry.entry_new', model=model) }}'">New</button>
|
||||||
|
</div>
|
||||||
|
<h1 class="display-6 text-center">{{ model|title }} Listing</h1>
|
||||||
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ table | safe }}
|
{{ table | safe }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue