From 2a7b32d4f42246f90a9b08d0936e42c380c8e022 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 24 Feb 2021 16:37:32 +1100 Subject: [PATCH] Part display tweaks --- InvenTree/InvenTree/static/css/inventree.css | 7 +- InvenTree/part/templates/part/part_base.html | 300 ++++++++++--------- 2 files changed, 157 insertions(+), 150 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index fe3fc5e7cf..90210c6d70 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -545,7 +545,7 @@ } .media { - padding-top: 15px; + //padding-top: 15px; overflow: visible; } @@ -811,6 +811,11 @@ input[type="submit"] { background-color: #fafafa; } +.panel-inventree { + padding: 10px; + box-shadow: 1px 1px #DDD; +} + .float-right { float: right; } diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 8dd11bbf08..a2b7cc55bb 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -26,173 +26,175 @@ {% endif %} -
-
- {% include "part/part_thumb.html" %} -
-

- {{ part.full_name }} - {% if user.is_staff and roles.part.change %} - - {% endif %} - {% if not part.active %} -
- {% trans 'Inactive' %} -
- {% endif %} -

-

{{ part.description }}

+
+
+
+ {% include "part/part_thumb.html" %} +
+

+ {{ part.full_name }} + {% if user.is_staff and roles.part.change %} + + {% endif %} + {% if not part.active %} +
+ {% trans 'Inactive' %} +
+ {% endif %} +

+

{{ part.description }}

-
- +
+ - {% if barcodes %} - -
- - + {% if barcodes %} + + + {% endif %} + {% if part.active %} + + {% if roles.stock.change %} + + {% endif %} + {% if part.purchaseable %} + {% if roles.purchase_order.add %} + + {% endif %} + {% endif %} + {% endif %} + + {% if roles.part.add or roles.part.change or roles.part.delete %} +
+ + +
+ {% endif %}
- {% endif %} - {% if part.active %} - - {% if roles.stock.change %} - - {% endif %} - {% if part.purchaseable %} - {% if roles.purchase_order.add %} - - {% endif %} - {% endif %} - {% endif %} - - {% if roles.part.add or roles.part.change or roles.part.delete %} -
- - -
- {% endif %} + + + {% if part.IPN %} + + + + + + {% endif %} + {% if part.link %} + + + + + + {% endif %} + + +
{% trans "IPN" %}{{ part.IPN }}
{% trans "External Link" %}{{ part.link }}
- + + +
+
- {% if part.IPN %} + + + + + + + + + + + {% if on_order > 0 %} + + + + + + {% endif %} + {% if required_build_order_quantity > 0 %} + + + + + {% endif %} + {% if required_sales_order_quantity > 0 %} + + + + + {% endif %} + {% if allocated > 0 %} + + + + + + {% endif %} + + {% if not part.is_template %} + {% if part.assembly %} + + + + - - + + + + {% if quantity_being_built > 0 %} + + + + {% endif %} - {% if part.link %} - - - - - {% endif %} - - + {% endif %}
+

{% trans "Available Stock" %}

+

{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

{% trans "In Stock" %}{% include "part/stock_count.html" %}
{% trans "On Order" %}{% decimal on_order %}
{% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} +
{% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} +
{% trans "Allocated to Orders" %}{% decimal allocated %}
+ {% trans "Build Status" %} +
{% trans "IPN" %}{{ part.IPN }}{% trans "Can Build" %}{% decimal part.can_build %}
{% trans "Building" %}{% decimal quantity_being_built %}
{% trans "External Link" %}{{ part.link }}
-
-
- - - - - - - - - - - - - {% if on_order > 0 %} - - - - - - {% endif %} - {% if required_build_order_quantity > 0 %} - - - - - {% endif %} - {% if required_sales_order_quantity > 0 %} - - - - - {% endif %} - {% if allocated > 0 %} - - - - - - {% endif %} - {% if not part.is_template %} - {% if part.assembly %} - - - - - - - - - - {% if quantity_being_built > 0 %} - - - - - - {% endif %} - {% endif %} - {% endif %} -
-

{% trans "Available Stock" %}

-

{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

{% trans "In Stock" %}{% include "part/stock_count.html" %}
{% trans "On Order" %}{% decimal on_order %}
{% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} -
{% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} -
{% trans "Allocated to Orders" %}{% decimal allocated %}
- {% trans "Build Status" %} -
{% trans "Can Build" %}{% decimal part.can_build %}
{% trans "Building" %}{% decimal quantity_being_built %}
-
-
- + {% block details %} - - - -{% endblock %} + + + + {% endblock %}
{% endblock %}