mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
Tweak javascript for category detail pages
This commit is contained in:
@ -1,34 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
|
||||
<h3>Part Builds</h3>
|
||||
|
||||
<table class='table table-striped'>
|
||||
<table class='table table-striped' id='build-list' data-sorting='true' data-filtering='true'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Build</th>
|
||||
<th>Part</th>
|
||||
<th>Quantity</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if active|length > 0 %}
|
||||
<tr><td colspan="4"><b>Active Builds</b></td></tr>
|
||||
{% include "build/build_list.html" with builds=active %}
|
||||
{% endif %}
|
||||
|
||||
{% if complete|length > 0 %}
|
||||
<tr></tr>
|
||||
<tr><td colspan="4"><b>Completed Builds</b></td></tr>
|
||||
{% include "build/build_list.html" with builds=complete %}
|
||||
{% endif %}
|
||||
|
||||
{% if cancelled|length > 0 %}
|
||||
<tr></tr>
|
||||
<tr><td colspan="4"><b>Cancelled Builds</b></td></tr>
|
||||
{% include "build/build_list.html" with builds=cancelled.all %}
|
||||
{% endif %}
|
||||
{% include "build/build_list.html" with builds=builds %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
|
||||
<script type='text/javascript' src="{% static 'script/footable.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#build-list').footable();
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
@ -25,10 +25,12 @@ class BuildIndex(ListView):
|
||||
|
||||
context = super(BuildIndex, self).get_context_data(**kwargs).copy()
|
||||
|
||||
"""
|
||||
context['active'] = self.get_queryset().filter(status__in=[Build.PENDING, Build.HOLDING])
|
||||
|
||||
context['complete'] = self.get_queryset().filter(status=Build.COMPLETE)
|
||||
context['cancelled'] = self.get_queryset().filter(status=Build.CANCELLED)
|
||||
"""
|
||||
|
||||
return context
|
||||
|
||||
|
Reference in New Issue
Block a user