From 6e1b7bf3f0871ad742bfbad3fe931db92442ba72 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 19:05:18 +1000 Subject: [PATCH] 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; }