mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
80 lines
2.3 KiB
HTML
80 lines
2.3 KiB
HTML
{% extends 'base_assets.html' %}
|
|
{% block title %}List{% endblock %}
|
|
{% load paginator from filters %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="page-header">
|
|
<h1 class="text-center">Asset List</h1>
|
|
</div>
|
|
|
|
<form id="asset-search-form" method="get" class="form-inline pull-right">
|
|
{% csrf_token %}
|
|
<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>
|
|
<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">
|
|
<thead>
|
|
<tr>
|
|
<th>Asset ID</th>
|
|
<th>Description</th>
|
|
<th>Category</th>
|
|
<th>Status</th>
|
|
<th>Quick Links</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="asset_table_body">
|
|
{% include 'partials/asset_list_table_body.html' %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if is_paginated %}
|
|
<div class="text-center">
|
|
{% paginator %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
{% endblock %}
|