Files
PyRIGS/assets/templates/asset_list.html
2019-10-02 12:40:55 +01:00

52 lines
1.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 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>
<table class="table table-striped">
<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="text-center">
{% paginator %}
</div>
{% endif %}
{% endblock %}
{% block script %}
<script>
$('#asset-filter-form').on('submit', function (event) {
event.preventDefault();
filterAssetTable();
return false;
});
</script>
{% endblock %}