From 783b8964d100d385f5af5518e6af87d17abfdc67 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 18 Jun 2019 18:49:52 +1000 Subject: [PATCH] Add 'slide' for part type --- InvenTree/part/templates/part/detail.html | 24 +++++++++-------------- InvenTree/templates/slide.html | 8 ++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 InvenTree/templates/slide.html diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index fe357a6bdc..f46a591616 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -6,7 +6,6 @@
-

Part Details

@@ -30,10 +29,9 @@
-
-
+

Part Details

@@ -102,37 +100,33 @@
Part name
+

Part Type

- {% if part.assembly %} - + + - {% endif %} - {% if part.component %} + - {% endif %} - {% if part.trackable %} + - {% endif %} - {% if part.purchaseable %} + - {% endif %} - {% if part.salable %} - + + - {% endif %}
AssemblyAssembly{% include "slide.html" with state=part.assembly %} This part can be assembled from other parts
Component{% include "slide.html" with state=part.component %} This part can be used in assemblies
Trackable{% include "slide.html" with state=part.trackable %} Stock for this part will be tracked by (serial or batch)
Purchaseable{% include "slide.html" with state=part.purchaseable %} This part can be purchased from external suppliers
SalableSellable{% include "slide.html" with state=part.salable %} This part can be sold to customers
diff --git a/InvenTree/templates/slide.html b/InvenTree/templates/slide.html new file mode 100644 index 0000000000..7694e99016 --- /dev/null +++ b/InvenTree/templates/slide.html @@ -0,0 +1,8 @@ +
+ + {% if state %} + + {% else %} + + {% endif %} +
\ No newline at end of file