From 360f0406b56e071c80353c7d72ebe84ba1da0229 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 1 Nov 2021 08:38:24 +1100 Subject: [PATCH 1/3] CSS updates - Add template for filter lists - Filter lists now layout horizontally - Change flex-row to flex-wrap --- InvenTree/build/templates/build/detail.html | 14 ++--- InvenTree/build/templates/build/index.html | 4 +- .../company/templates/company/detail.html | 28 +++------ .../templates/company/manufacturer_part.html | 4 +- .../templates/company/supplier_part.html | 4 +- .../order/purchase_order_detail.html | 8 +-- .../templates/order/purchase_orders.html | 4 +- .../templates/order/sales_order_detail.html | 7 +-- .../order/templates/order/sales_orders.html | 4 +- InvenTree/part/templates/part/bom.html | 7 +-- InvenTree/part/templates/part/category.html | 10 +--- InvenTree/part/templates/part/detail.html | 59 +++++++------------ InvenTree/stock/templates/stock/item.html | 16 ++--- InvenTree/stock/templates/stock/location.html | 4 +- InvenTree/templates/attachment_table.html | 6 +- InvenTree/templates/filter_list.html | 1 + InvenTree/templates/stock_table.html | 4 +- 17 files changed, 65 insertions(+), 119 deletions(-) create mode 100644 InvenTree/templates/filter_list.html diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index c299c7e1b9..9400eb6473 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -160,9 +160,7 @@
-
- -
+ {% include "filter_list.html" with id='sub-build' %}
@@ -171,7 +169,7 @@
-
+

{% trans "Allocate Stock to Build" %}

{% include "spacer.html" %}
@@ -210,9 +208,7 @@ -
- -
+ {% include "filter_list.html" with id='builditems' %}
@@ -227,7 +223,7 @@
-
+

{% trans "Incomplete Build Outputs" %}

{% include "spacer.html" %}
@@ -276,7 +272,7 @@
-
+

{% trans "Attachments" %}

{% include "spacer.html" %}
diff --git a/InvenTree/build/templates/build/index.html b/InvenTree/build/templates/build/index.html index 01970c45aa..ba8997ca05 100644 --- a/InvenTree/build/templates/build/index.html +++ b/InvenTree/build/templates/build/index.html @@ -45,9 +45,7 @@ -
- -
+ {% include "filter_list.html" with id="build" %}
diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html index 14bc79b277..4181d81b6f 100644 --- a/InvenTree/company/templates/company/detail.html +++ b/InvenTree/company/templates/company/detail.html @@ -11,7 +11,7 @@
-
+

{% trans "Supplier Parts" %}

{% include "spacer.html" %}
@@ -46,9 +46,7 @@
-
- -
+ {% include "filter_list.html" with id="supplier-part" %}
{% endif %} @@ -60,7 +58,7 @@
-
+

{% trans "Manufacturer Parts" %}

{% include "spacer.html" %}
@@ -95,9 +93,7 @@
-
- -
+ {% include "filter_list.html" with id="supplier-part" %}
{% endif %} @@ -117,7 +113,7 @@
-
+

{% trans "Purchase Orders" %}

{% include "spacer.html" %}
@@ -132,9 +128,7 @@
-
- -
+ {% include "filter_list.html" with id="purchaseorder" %}
@@ -145,7 +139,7 @@
-
+

{% trans "Sales Orders" %}

{% include "spacer.html" %}
@@ -160,9 +154,7 @@
-
- -
+ {% include "filter_list.html" with id="salesorder" %}
@@ -177,9 +169,7 @@
-
- -
+ {% include "filter_list.html" with id="stock" %}
diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html index dad72e5558..fcfa22ee2d 100644 --- a/InvenTree/company/templates/company/manufacturer_part.html +++ b/InvenTree/company/templates/company/manufacturer_part.html @@ -104,7 +104,7 @@ src="{% static 'img/blank_image.png' %}"
-
+

{% trans "Suppliers" %}

{% include "spacer.html" %}
@@ -133,7 +133,7 @@ src="{% static 'img/blank_image.png' %}"
-
+

{% trans "Parameters" %}

{% include "spacer.html" %}
diff --git a/InvenTree/company/templates/company/supplier_part.html b/InvenTree/company/templates/company/supplier_part.html index 2f68f9b12b..52742cf488 100644 --- a/InvenTree/company/templates/company/supplier_part.html +++ b/InvenTree/company/templates/company/supplier_part.html @@ -143,7 +143,7 @@ src="{% static 'img/blank_image.png' %}"
-
+

{% trans "Supplier Part Orders" %}

{% include "spacer.html" %}
@@ -167,7 +167,7 @@ src="{% static 'img/blank_image.png' %}"
-
+

{% trans "Pricing Information" %}

{% include "spacer.html" %}
diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 6a016d110a..b0d9d7d301 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -14,7 +14,7 @@
-
+

{% trans "Purchase Order Items" %}

{% include "spacer.html" %}
@@ -37,9 +37,7 @@
-
- -
+ {% include "filter_list.html" with id="order-lines" %}
@@ -58,7 +56,7 @@
-
+

{% trans "Attachments" %}

{% include "spacer.html" %}
diff --git a/InvenTree/order/templates/order/purchase_orders.html b/InvenTree/order/templates/order/purchase_orders.html index 4be817f8d2..e15e009927 100644 --- a/InvenTree/order/templates/order/purchase_orders.html +++ b/InvenTree/order/templates/order/purchase_orders.html @@ -36,9 +36,7 @@ -
- -
+ {% include "filter_list.html" with id="purchaseorder" %}
diff --git a/InvenTree/order/templates/order/sales_order_detail.html b/InvenTree/order/templates/order/sales_order_detail.html index 5d4db70a34..887ecd390c 100644 --- a/InvenTree/order/templates/order/sales_order_detail.html +++ b/InvenTree/order/templates/order/sales_order_detail.html @@ -14,7 +14,7 @@
-
+

{% trans "Sales Order Items" %}

{% include "spacer.html" %}
@@ -29,8 +29,7 @@
-
-
+ {% include "filter_list.html" with id="sales-order-lines" %}
@@ -49,7 +48,7 @@
-
+

{% trans "Attachments" %}

{% include "spacer.html" %}
diff --git a/InvenTree/order/templates/order/sales_orders.html b/InvenTree/order/templates/order/sales_orders.html index 048296c16b..bde9833bd6 100644 --- a/InvenTree/order/templates/order/sales_orders.html +++ b/InvenTree/order/templates/order/sales_orders.html @@ -39,9 +39,7 @@ -
- -
+ {% include "filter_list.html" with id="salesorder" %}
diff --git a/InvenTree/part/templates/part/bom.html b/InvenTree/part/templates/part/bom.html index aa01dd64eb..7a3ab1ad6d 100644 --- a/InvenTree/part/templates/part/bom.html +++ b/InvenTree/part/templates/part/bom.html @@ -34,11 +34,8 @@
  • {% trans "Delete Items" %}
  • - {% endif %} - -
    - -
    + {% endif %} + {% include "filter_list.html" with id="bom" %}
    diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 249c053801..6672adf210 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -116,7 +116,7 @@
    -
    +

    {% trans "Parts" %}

    {% include "spacer.html" %}
    @@ -146,9 +146,7 @@
  • {% trans "Export Data" %}
  • -
    - -
    + {% include "filter_list.html" with id="parts" %}
    @@ -174,9 +172,7 @@
    -
    - -
    + {% include "filter_list.html" with id="category" %}
    diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index b5008ae699..145b5bfb35 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -109,7 +109,7 @@
    -
    +

    {% trans "Part Test Templates" %}

    {% include "spacer.html" %}
    @@ -123,10 +123,8 @@
    -
    -
    - -
    +
    + {% include "filter_list.html" with id="parttests" %}
    @@ -136,7 +134,7 @@
    -
    +

    {% trans "Purchase Orders" %}

    {% include "spacer.html" %}
    @@ -149,9 +147,7 @@
    -
    - -
    + {% include "filter_list.html" with id="purchaseorder" %}
    @@ -166,13 +162,8 @@
    -
    - {% if 0 %} - - {% endif %} -
    - -
    +
    + {% include "filter_list.html" with id="salesorder" %}
    @@ -221,7 +212,7 @@
    -
    +

    {% trans "Part Variants" %}

    {% include "spacer.html" %}
    @@ -238,9 +229,7 @@
    -
    - -
    + {% include "filter_list.html" with id="variants" %}
    @@ -251,7 +240,7 @@
    -
    +

    {% trans "Parameters" %}

    {% include "spacer.html" %}
    @@ -274,7 +263,7 @@
    -
    +

    {% trans "Attachments" %}

    {% include "spacer.html" %}
    @@ -289,7 +278,7 @@