From afcbd73026cbd1b247255638e3eec01f9941664b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 19 Jun 2019 07:58:14 +1000 Subject: [PATCH] Consolidate visual style for "Part" tabs --- .../order/order_wizard/select_parts.html | 2 +- .../part/templates/part/attachments.html | 63 ++++++++++--------- InvenTree/part/templates/part/detail.html | 6 +- InvenTree/part/templates/part/orders.html | 31 +++++++-- InvenTree/part/templates/part/stock.html | 8 +-- InvenTree/part/templates/part/supplier.html | 9 +-- InvenTree/part/templates/part/tabs.html | 4 +- InvenTree/part/templates/part/used_in.html | 10 +-- 8 files changed, 69 insertions(+), 64 deletions(-) diff --git a/InvenTree/order/templates/order/order_wizard/select_parts.html b/InvenTree/order/templates/order/order_wizard/select_parts.html index f8ed6e2a93..b872e5aa71 100644 --- a/InvenTree/order/templates/order/order_wizard/select_parts.html +++ b/InvenTree/order/templates/order/order_wizard/select_parts.html @@ -3,7 +3,7 @@ {% block form %}

- Step 1 of 2 - Select Parts + Step 1 of 2 - Select Part Suppliers

{% if parts|length > 0 %} diff --git a/InvenTree/part/templates/part/attachments.html b/InvenTree/part/templates/part/attachments.html index 493002d2f0..882d9aee8d 100644 --- a/InvenTree/part/templates/part/attachments.html +++ b/InvenTree/part/templates/part/attachments.html @@ -5,37 +5,39 @@ {% include 'part/tabs.html' with tab='attachments' %} -
-
-

Part Attachments

-
-
-
- -
-
-
+

Part Attachments


- - - - - - -{% for attachment in part.attachments.all %} - - - - - -{% endfor %} +
+
+ +
+
+ + +
FileComment
{{ attachment.basename }}{{ attachment.comment }} -
- - -
-
+ + + + + + + + + {% for attachment in part.attachments.all %} + + + + + + {% endfor %} + {% if part.variant_of and part.variant_of.attachments.count > 0 %}
FileComment
{{ attachment.basename }}{{ attachment.comment }} +
+ + +
+
@@ -83,4 +85,9 @@ }); }); + $("#attachment-table").bootstrapTable({ + search: true, + sortable: true, + }); + {% endblock %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index ef47e70515..68ae0ed3bd 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -4,9 +4,12 @@ {% include 'part/tabs.html' with tab='detail' %} +

Part Details

+ +
+
-

Part Details

@@ -75,7 +78,6 @@
Part name
-

Part Type

diff --git a/InvenTree/part/templates/part/orders.html b/InvenTree/part/templates/part/orders.html index 8c9f0c3cee..975a41049a 100644 --- a/InvenTree/part/templates/part/orders.html +++ b/InvenTree/part/templates/part/orders.html @@ -5,19 +5,38 @@ {% include 'part/tabs.html' with tab='orders' %} -
-
-

Open Part Orders

-
-
+

Part Orders

+
+ +
+
+
-{% include "order/po_table.html" with orders=part.open_purchase_orders %} +{% include "order/po_table.html" with orders=part.open_purchase_orders toolbar='#button-bar' %} {% if part.closed_purchase_orders|length > 0 %}

Closed Orders

{% include "order/po_table.html" with orders=part.closed_purchase_orders %} {% endif %} +{% endblock %} + +{% block js_ready %} +{{ block.super }} + +$("#po-table").bootstrapTable({ + search: true, + sortable: true, +}); + +$("#part-order-2").click(function() { + launchModalForm("/order/purchase-order/order-parts/", { + data: { + part: {{ part.id }}, + }, + }); +}); + {% endblock %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index 04d1b0278a..a41d5fd32a 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -4,13 +4,7 @@ {% include 'part/tabs.html' with tab='stock' %} -
-
-

Part Stock

-
-
-
-
+

Part Stock


{% if part.is_template %} diff --git a/InvenTree/part/templates/part/supplier.html b/InvenTree/part/templates/part/supplier.html index ea5baa2759..30fe9ecc0b 100644 --- a/InvenTree/part/templates/part/supplier.html +++ b/InvenTree/part/templates/part/supplier.html @@ -4,14 +4,7 @@ {% include 'part/tabs.html' with tab='suppliers' %} -
-
-

Part Suppliers

-
-
-
-
- +

Part Suppliers


diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index c7dbb2418f..aa7a9fa885 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -48,6 +48,4 @@ Attachments {% if part.attachment_count > 0 %}{{ part.attachment_count }}{% endif %} - - -
\ No newline at end of file + \ No newline at end of file diff --git a/InvenTree/part/templates/part/used_in.html b/InvenTree/part/templates/part/used_in.html index 135427e313..fb7e76e7e9 100644 --- a/InvenTree/part/templates/part/used_in.html +++ b/InvenTree/part/templates/part/used_in.html @@ -4,15 +4,7 @@ {% include 'part/tabs.html' with tab='used' %} -
-
-

Used to Build

-
-
-
-
-
-
+

Assemblies


Virtual