mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 21:42:14 +00:00
Merge branch 'asset-assetforms' of https://github.com/nottinghamtec/PyRIGS into asset-assetforms
This commit is contained in:
@@ -8,45 +8,48 @@
|
||||
<h1 class="text-center">Asset List</h1>
|
||||
</div>
|
||||
|
||||
<form id="asset-search-form" method="get">
|
||||
<form id="asset-search-form" method="get" class="form-inline pull-right">
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="query" name="query" placeholder="Search by Asset ID/Description" class="form-control" value="{{search_name}}">
|
||||
<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}}" style="width: 250px">
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cat">Category:</label>
|
||||
<select name="cat" class="form-control">
|
||||
<option value="">None</option>
|
||||
{% for name in categories %}
|
||||
{% if name.name == category_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="status">Status:</label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="">None</option>
|
||||
{% for name in statuses %}
|
||||
{% if name.name == status_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<!---TODO: Auto filter whenever an option is selected, instead of using a button -->
|
||||
<button type="submit" class="btn btn-default">Filter</button>
|
||||
<br>
|
||||
<div style="margin-top: 1em;" class="pull-right">
|
||||
<div class="form-group">
|
||||
<label for="cat" class="sr-only">Category</label>
|
||||
<select name="cat" class="form-control">
|
||||
<option value="" class="text-muted">(category)</option>
|
||||
{% for name in categories %}
|
||||
{% if name.name == category_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="status" class="sr-only">Status</label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="">(status)</option>
|
||||
{% for name in statuses %}
|
||||
{% if name.name == status_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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>
|
||||
|
||||
<table class="table">
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
text-muted
|
||||
{% endif %}
|
||||
">
|
||||
<td><a href="{% url 'asset_detail' item.pk %}">{{ item.asset_id }}</a></td>
|
||||
<td>{{ item.description }}</td>
|
||||
<td>{{ item.category }}</td>
|
||||
<td>{{ item.status }}</td>
|
||||
<td style="vertical-align: middle;"><a href="{% url 'asset_detail' item.pk %}">{{ item.asset_id }}</a></td>
|
||||
<td style="vertical-align: middle;">{{ item.description }}</td>
|
||||
<td style="vertical-align: middle;">{{ item.category }}</td>
|
||||
<td style="vertical-align: middle;">{{ item.status }}</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
<a type="button" class="btn btn-default btn-sm" href="{% url 'asset_detail' item.pk %}"><i class="glyphicon glyphicon-eye-open"></i> View</a>
|
||||
|
||||
Reference in New Issue
Block a user