From ad1d75c2595e9feddb9ba7c63ae2d0511b1b5780 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 1 May 2019 18:54:54 +1000 Subject: [PATCH] Improve table formatting when no allocation items found --- InvenTree/build/templates/build/allocate.html | 1 + InvenTree/static/css/inventree.css | 4 ++++ InvenTree/static/script/inventree/build.js | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/InvenTree/build/templates/build/allocate.html b/InvenTree/build/templates/build/allocate.html index 1b52a5a144..92d0e9bf7b 100644 --- a/InvenTree/build/templates/build/allocate.html +++ b/InvenTree/build/templates/build/allocate.html @@ -36,6 +36,7 @@ loadAllocationTable( $("#allocate-table-id-{{ bom_item.sub_part.id }}"), + "{{ bom_item.sub_part.name }}", "{% url 'api-build-item-list' %}?build={{ build.id }}&part={{ bom_item.sub_part.id }}", $("#new-item-{{ bom_item.sub_part.id }}") ); diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index 14b021adc7..f16ce3f038 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -122,6 +122,10 @@ margin-right: 2px; } +.panel-group { + margin-bottom: 5px; +} + .float-right { float: right; } diff --git a/InvenTree/static/script/inventree/build.js b/InvenTree/static/script/inventree/build.js index 1ffc9fe1e5..92fbf430f7 100644 --- a/InvenTree/static/script/inventree/build.js +++ b/InvenTree/static/script/inventree/build.js @@ -1,9 +1,10 @@ -function loadAllocationTable(table, url, button) { +function loadAllocationTable(table, part, url, button) { // Load the allocation table table.bootstrapTable({ url: url, sortable: false, + formatNoMatches: function() { return 'No parts allocated for ' + part; }, columns: [ { field: 'stock_item_detail',