From fefbcf2ed9513fa7f8383bcfdb6ad1483423a845 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 18:49:05 +1000 Subject: [PATCH 1/6] Clean up buttons for stock location --- .../templates/company/company_base.html | 2 +- InvenTree/part/templates/part/part_base.html | 2 +- InvenTree/static/css/inventree.css | 12 +++++- InvenTree/stock/templates/stock/item.html | 9 +++-- InvenTree/stock/templates/stock/location.html | 37 ++++++++++++------- 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html index 2c1efbb7e5..61751fe0f4 100644 --- a/InvenTree/company/templates/company/company_base.html +++ b/InvenTree/company/templates/company/company_base.html @@ -34,7 +34,7 @@ InvenTree | Company - {{ company.name }} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 3377c730a5..e3f318fe10 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -65,7 +65,7 @@ {% if not part.active %} {% endif %} diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index 1b9caaa891..b12540467f 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -23,11 +23,19 @@ } .glyphicon-ok { - color: #5f5; + color: #5C5; } .glyphicon-remove { - color: #f55; + color: #C55; +} + +.glyphicon-trash { + color: #C55; +} + +.glyphicon-plus { + color: #5C5; } /* CSS overrides for treeview */ diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html index 02287d8669..35b4fcd9f1 100644 --- a/InvenTree/stock/templates/stock/item.html +++ b/InvenTree/stock/templates/stock/item.html @@ -16,6 +16,9 @@ + @@ -27,7 +30,7 @@

@@ -124,7 +127,7 @@ {% if item.has_tracking_info %} - +

Stock Tracking Information

@@ -181,7 +184,7 @@ itemAdjust("move"); }); - $("#stock-stocktake").click(function() { + $("#stock-count").click(function() { itemAdjust('count'); }); diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 987d433104..b7275395c7 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -9,7 +9,19 @@

{{ location.description }}

+ {% include "qr_button.html" %} + + +

{% else %} @@ -18,19 +30,6 @@ {% endif %}
-

-
- - {% if location %} - - {% endif %}

@@ -91,6 +90,18 @@ return false; }); + {% if location %} + $("#location-count").click(function() { + launchModalForm("/stock/adjust/", { + data: { + action: "count", + location: {{ location.id }}, + reload: true, + } + }); + }); + {% endif %} + $('#show-qr-code').click(function() { launchModalForm("{% url 'stock-location-qr' location.id %}", { From 1fc39d56df30dd38353c7ddc990afd700b7c5c9d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 18:50:05 +1000 Subject: [PATCH 2/6] Add 'new stock location' button to top-level locatino --- InvenTree/stock/templates/stock/location.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index b7275395c7..d201f76f91 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -7,11 +7,16 @@ {% if location %}

{{ location.name }}

{{ location.description }}

+ {% else %} +

Stock

+

All stock items

+ {% endif %}

+ {% if location %} {% include "qr_button.html" %} + {% endif %}

- {% else %} -

Stock

-

All stock items

- {% endif %}
From d837a1f9a238fe0b0e5f9a8695d0fff6e9010019 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 18:54:32 +1000 Subject: [PATCH 3/6] Buttonize the part category page --- InvenTree/part/templates/part/category.html | 55 ++++++++++----------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index bbe449d217..1109b26180 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -4,36 +4,35 @@ {% block content %}
-
- {% if category %} -

{{ category.name }}

-

{{ category.description }}

- {% if category.default_location %} -

Default Location: {{ category.default_location }}

- {% endif %} - {% else %} -

Part Categories

- {% endif %} -
-
-

-
- - {% if category %} -

-
{% if category and category.children.all|length > 0 %} From 6e1b7bf3f0871ad742bfbad3fe931db92442ba72 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 19:05:18 +1000 Subject: [PATCH 4/6] Fix buttons in attachment table --- .../part/templates/part/attachments.html | 8 +- InvenTree/part/templates/part/part_base.html | 73 ++++++++++++------- InvenTree/static/css/inventree.css | 4 + 3 files changed, 55 insertions(+), 30 deletions(-) diff --git a/InvenTree/part/templates/part/attachments.html b/InvenTree/part/templates/part/attachments.html index 882d9aee8d..b6837d8321 100644 --- a/InvenTree/part/templates/part/attachments.html +++ b/InvenTree/part/templates/part/attachments.html @@ -31,8 +31,12 @@ {{ attachment.comment }}
- - + +
diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index e3f318fe10..7339b5afb7 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -40,34 +40,41 @@

{{ part.description }}

-

- - {% if part.is_template == False %} - {% include "qr_button.html" %} - {% if part.active %} - - {% if part.purchaseable %} - - {% endif %} - {% endif %} - {% endif %} - - - {% if not part.active %} - - {% endif %} +
+
+ + {% if part.is_template == False %} + {% include "qr_button.html" %} + {% if part.active %} + + {% if not part.virtual %} + + {% endif %} + {% if part.purchaseable %} + + {% endif %} + {% endif %} + {% endif %} + + + {% if not part.active %} + + {% endif %} +

@@ -171,6 +178,16 @@ ); }); + $("#part-count").click(function() { + launchModalForm("/stock/adjust/", { + data: { + action: "count", + part: {{ part.id }}, + reload: true, + } + }); + }); + $("#price-button").click(function() { launchModalForm( "{% url 'part-pricing' part.id %}", diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index b12540467f..28c304485b 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -26,6 +26,10 @@ color: #5C5; } +.glyphicon-ok-circle { + color: #55c; +} + .glyphicon-remove { color: #C55; } From d07d815cb2b794e998f49d5046bb7a84617bbc9c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 19:07:18 +1000 Subject: [PATCH 5/6] Buttons for BOM editing table --- InvenTree/static/script/inventree/bom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/static/script/inventree/bom.js b/InvenTree/static/script/inventree/bom.js index 77dfbe740e..ac08237dea 100644 --- a/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/static/script/inventree/bom.js @@ -189,8 +189,8 @@ function loadBomTable(table, options) { if (options.editable) { cols.push({ formatter: function(value, row, index, field) { - var bEdit = ""; - var bDelt = ""; + var bEdit = ""; + var bDelt = ""; return "
" + bEdit + bDelt + "
"; } From 5ab3c386bb9cbe9a10b1685edda629df5467b073 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 19:09:31 +1000 Subject: [PATCH 6/6] Buttons for purchase order table --- .../order/templates/order/purchase_order_detail.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 99694f430f..575dd4a74b 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -121,11 +121,11 @@ InvenTree | {{ order }} {% if order.status == OrderStatus.PENDING %}
- -