Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions pygeoapi/templates/collections/items/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,30 @@ <h1>{% for l in data['links'] if l.rel == 'collection' %} {{ l['title'] }} {% en
{% if data['itemtype'] == 'record' %}
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="row">
<div class="col-sm-4">
<label for="q">Search</label>
<input name="q" id="q" type="text" class="form-control search-input" placeholder="Search">
</div>
<div class="col-sm-4">
<label for="datetime_begin">Start date</label>
<input name="datetime_begin" id="datetime_begin" type="date" class="form-control" />
</div>
<div class="col-sm-4">
<label for="datetime_end">End date</label>
<input name="datetime_end" id="datetime_end" type="date" class="form-control" />
<form id="searchForm">
<div class="row">
<div class="col-sm-4">
<label for="q">Search</label>
<input name="q" id="q" type="text" class="form-control search-input" placeholder="Search">
</div>
<div class="col-sm-4">
<label for="datetime_begin">Start date</label>
<input name="datetime_begin" id="datetime_begin" type="date" class="form-control" />
</div>
<div class="col-sm-4">
<label for="datetime_end">End date</label>
<input name="datetime_end" id="datetime_end" type="date" class="form-control" />
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<input class="form-check-input" onchange="checkSpatialFilter()" type="checkbox" id="spatial_filter_check">
<label class="form-check-label" for="spatial_filter_check">Spatial filter</label>
<button type="button" class="btn btn-primary" onclick="submitForm();">Search</button>
<button type="reset" class="btn btn-secondary">Reset</button>
<div class="row">
<div class="col-sm-12">
<input class="form-check-input" onchange="checkSpatialFilter()" type="checkbox" id="spatial_filter_check">
<label class="form-check-label" for="spatial_filter_check">Spatial filter</label>
<button type="button" class="btn btn-primary" onclick="submitForm();">Search</button>
<button type="reset" class="btn btn-secondary" onclick="document.getElementById('searchForm').reset();">Reset</button>
</div>
</div>
</div>
</form>
</div>
</div>
{% endif %}
Expand Down Expand Up @@ -205,12 +207,12 @@ <h1>{% for l in data['links'] if l.rel == 'collection' %} {{ l['title'] }} {% en
if (q) {
query_string.push('q=' + encodeURIComponent(q));
}
if (datetime_begin) {
if (datetime_begin !== "") {
datetime.push(datetime_begin + 'T00:00:00Z');
} else {
datetime.push('..');
}
if (datetime_end) {
if (datetime_end !== "") {
datetime.push(datetime_end + 'T23:59:59Z');
} else {
datetime.push('..');
Expand Down