Build table now bootstrap-table'd

This commit is contained in:
Oliver 2018-05-04 01:39:20 +10:00
parent 3511ce29ee
commit a1eeeab64c

View File

@ -4,7 +4,7 @@
<h3>Part Builds</h3>
<table class='table table-striped' id='build-list' data-sorting='true' data-filtering='true'>
<table class='table table-striped table-condensed' id='build-table'>
<thead>
<tr>
<th>Build</th>
@ -32,7 +32,7 @@
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
{% endblock %}
{% block js_ready %}
$("#new-build").click(function() {
launchModalForm("#modal-form",
"{% url 'build-create' %}",
@ -41,4 +41,30 @@
});
});
$("#build-table").bootstrapTable({
sortable: true,
search: true,
columns: [
{
field: 'name',
title: 'Build',
sortable: true,
},
{
field: 'part',
title: 'Part',
sortable: true,
},
{
title: 'Quantity',
sortable: true,
searchable: false
},
{
title: 'Status',
sortable: true,
}
]
});
{% endblock %}