Upload files to "/"
This commit is contained in:
@@ -4,7 +4,41 @@
|
||||
<div class="dashboard-container">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
{# ── Filter bar ─────────────────────────────────────────── #}
|
||||
<form class="filter-bar" method="get" id="filter-form" onsubmit="
|
||||
this.querySelectorAll('input').forEach(function(el){ if(!el.value) el.disabled = true; });
|
||||
">
|
||||
<div class="filter-group">
|
||||
<label for="recon_job_name">Job Name</label>
|
||||
<input type="text" id="recon_job_name" name="recon_job_name"
|
||||
placeholder="e.g. daily-fx-recon"
|
||||
value="{{ recon_job_name or '' }}">
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<label for="as_at_date">As-at Date</label>
|
||||
<input type="date" id="as_at_date" name="as_at_date"
|
||||
value="{{ as_at_date or '' }}">
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn btn-primary">Apply</button>
|
||||
<a href="?" class="btn btn-secondary">Clear</a>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
(function () {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
["recon_job_name", "as_at_date"].forEach(function (key) {
|
||||
var val = params.get(key);
|
||||
if (val) {
|
||||
var el = document.getElementById(key);
|
||||
if (el) el.value = val;
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
{% if results | length > 0 %}
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -31,6 +65,30 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{# ── Pagination ─────────────────────────────────────────── #}
|
||||
{# Build filter params string only for values that are set #}
|
||||
{% set filter_qs %}{% if recon_job_name %}&recon_job_name={{ recon_job_name }}{% endif %}{% if as_at_date %}&as_at_date={{ as_at_date }}{% endif %}{% endset %}
|
||||
<div class="pagination">
|
||||
{% if prev_cursor %}
|
||||
<a class="btn btn-secondary"
|
||||
href="?cursor={{ prev_cursor }}{{ filter_qs }}">
|
||||
← Previous
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn btn-secondary btn-disabled">← Previous</span>
|
||||
{% endif %}
|
||||
|
||||
{% if next_cursor %}
|
||||
<a class="btn btn-secondary"
|
||||
href="?cursor={{ next_cursor }}{{ filter_qs }}">
|
||||
Next →
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn btn-secondary btn-disabled">Next →</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user