diff --git a/InvenTree/build/templates/build/build_list.html b/InvenTree/build/templates/build/build_list.html index 5720235911..befa01dbea 100644 --- a/InvenTree/build/templates/build/build_list.html +++ b/InvenTree/build/templates/build/build_list.html @@ -1,4 +1,20 @@ +{% extends "collapse.html" %} +{% block collapse_title %} +{{ title }}{{ builds | length }} +{% endblock %} + +{% block collapse_content %} + + + + + + + + + + {% for build in builds %} @@ -6,4 +22,7 @@ -{% endfor %} \ No newline at end of file +{% endfor %} + +
BuildPartQuantityStatus
{{ build.title }}{{ build.quantity }} {% include "build_status.html" with build=build %}
+{% endblock %} \ No newline at end of file diff --git a/InvenTree/build/templates/build/index.html b/InvenTree/build/templates/build/index.html index 553353ed4d..46d3533651 100644 --- a/InvenTree/build/templates/build/index.html +++ b/InvenTree/build/templates/build/index.html @@ -2,28 +2,40 @@ {% load static %} {% block content %} -

Part Builds

-
- +

Active Builds

+ +
+
+ +
- - +
+ + + + + + + + + +{% for build in active %} - - - - + + + + - - - -{% include "build/build_list.html" with builds=builds %} - +{% endfor %}
BuildPartQuantityStatus
BuildPartQuantityStatus{{ build.title }}{{ build.part.name }}{{ build.quantity }}{% include "build_status.html" with build=build %}
+

+{% include "build/build_list.html" with builds=completed title="Completed Builds" collapse_id="complete" %} +

+{% include "build/build_list.html" with builds=cancelled title="Cancelled Builds" collapse_id="cancelled" %} {% include 'modals.html' %} @@ -39,9 +51,10 @@ }); }); - $("#build-table").bootstrapTable({ + $(".build-table").bootstrapTable({ sortable: true, search: true, + formatNoMatches: function() { return 'No builds found'; }, columns: [ { field: 'name', diff --git a/InvenTree/build/views.py b/InvenTree/build/views.py index f7de8a3a54..109ceb3cff 100644 --- a/InvenTree/build/views.py +++ b/InvenTree/build/views.py @@ -33,12 +33,10 @@ 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['active'] = self.get_queryset().filter(status__in=[Build.PENDING,]) context['complete'] = self.get_queryset().filter(status=Build.COMPLETE) context['cancelled'] = self.get_queryset().filter(status=Build.CANCELLED) - """ return context