mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Prettify search/filter a bit
This commit is contained in:
@@ -8,45 +8,48 @@
|
|||||||
<h1 class="text-center">Asset List</h1>
|
<h1 class="text-center">Asset List</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="asset-search-form" method="get">
|
<form id="asset-search-form" method="get" class="form-inline pull-right">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="input-group">
|
<div class="input-group pull-right" style="width: auto;">
|
||||||
<input type="query" name="query" placeholder="Search by Asset ID/Description" class="form-control" value="{{search_name}}">
|
<input type="query" name="query" placeholder="Search by Asset ID/Description" class="form-control" value="{{search_name}}" style="width: 250px">
|
||||||
<label for="asset_id" class="sr-only">Asset ID/Description:</label>
|
<label for="asset_id" class="sr-only">Asset ID/Description:</label>
|
||||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">Search</button></span>
|
<span class="input-group-btn"><button type="submit" class="btn btn-default">Search</button></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<br>
|
||||||
<label for="cat">Category:</label>
|
<div style="margin-top: 1em;" class="pull-right">
|
||||||
<select name="cat" class="form-control">
|
<div class="form-group">
|
||||||
<option value="">None</option>
|
<label for="cat" class="sr-only">Category</label>
|
||||||
{% for name in categories %}
|
<select name="cat" class="form-control">
|
||||||
{% if name.name == category_select %}
|
<option value="" class="text-muted">(category)</option>
|
||||||
<option selected>
|
{% for name in categories %}
|
||||||
{% else %}
|
{% if name.name == category_select %}
|
||||||
<option>
|
<option selected>
|
||||||
{% endif %}
|
{% else %}
|
||||||
{{ name }}
|
<option>
|
||||||
</option>
|
{% endif %}
|
||||||
{% endfor %}
|
{{ name }}
|
||||||
</select>
|
</option>
|
||||||
</div>
|
{% endfor %}
|
||||||
<div class="form-group">
|
</select>
|
||||||
<label for="status">Status:</label>
|
</div>
|
||||||
<select name="status" class="form-control">
|
<div class="form-group">
|
||||||
<option value="">None</option>
|
<label for="status" class="sr-only">Status</label>
|
||||||
{% for name in statuses %}
|
<select name="status" class="form-control">
|
||||||
{% if name.name == status_select %}
|
<option value="">(status)</option>
|
||||||
<option selected>
|
{% for name in statuses %}
|
||||||
{% else %}
|
{% if name.name == status_select %}
|
||||||
<option>
|
<option selected>
|
||||||
{% endif %}
|
{% else %}
|
||||||
{{ name }}
|
<option>
|
||||||
</option>
|
{% endif %}
|
||||||
{% endfor %}
|
{{ name }}
|
||||||
</select>
|
</option>
|
||||||
</div>
|
{% endfor %}
|
||||||
<!---TODO: Auto filter whenever an option is selected, instead of using a button -->
|
</select>
|
||||||
<button type="submit" class="btn btn-default">Filter</button>
|
</div>
|
||||||
|
<!---TODO: Auto filter whenever an option is selected, instead of using a button -->
|
||||||
|
<button type="submit" class="btn btn-default">Filter</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|||||||
Reference in New Issue
Block a user