Files
PyRIGS/assets/templates/asset_list.html
2019-10-01 19:59:02 +01:00

52 lines
1.3 KiB
HTML

{% extends 'base.html' %}
{% block title %}List{% endblock %}
{% load paginator from filters %}
{% block content %}
<h2 class="text-center">Asset List</h2>
<div class="col-lg-6">
<form method="post" id="asset-filter-form">
{% csrf_token %}
<div class="input-group">
<input type="text" name="asset_id" placeholder="Asset ID" class="form-control">
<label for="asset_id" class="sr-only">Asset ID</label>
<span class="input-group-btn"><button type="submit" class="btn">Search</button></span>
</div>
</form>
</div>
<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 'asset_list_table_body.html' %}
</tbody>
</table>
{% if is_paginated %}
<div class="col-md-6 text-right">
{% paginator %}
</div>
{% endif %}
{% endblock %}
{% block script %}
<script>
$('#asset-filter-form').on('submit', function (event) {
event.preventDefault();
filterAssetTable();
return false;
});
</script>
{% endblock %}