From f938e722b97fb9cb58293c979c2872e493d3e386 Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 16 Jul 2021 12:08:26 -0400 Subject: [PATCH] Another shot at it! --- InvenTree/part/templates/part/part_base.html | 501 ++++++++++--------- 1 file changed, 253 insertions(+), 248 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 073f3eeff9..3c518df780 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -10,262 +10,267 @@ {% block content %} -
+
+ +

{{ part.full_name }}

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

+

+ + {% if user.is_staff and roles.part.change %} +   + {% endif %} + +
+ {% if part.is_template %} + + {% endif %} + {% if part.assembly %} + + {% endif %} + {% if part.component %} + + {% endif %} + {% if part.trackable %} + + {% endif %} + {% if part.purchaseable %} + + {% endif %} + {% if part.salable %} + + {% endif %} +
+ + {% if not part.active %} +   +
+ + {% trans 'Inactive' %} +
+ {% endif %} + + {% if part.virtual and part.active %} +   +
+ + {% trans 'Virtual' %} +
+ {% endif %} +

+

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

- {{ part.full_name }} -

-

-

- - {% if user.is_staff and roles.part.change %} - - {% endif %} - -
- {% if part.virtual %} - +
+ + + {% if barcodes %} + + {% endif %} - {% if part.is_template %} - - {% endif %} - {% if part.assembly %} - - {% endif %} - {% if part.component %} - - {% endif %} - {% if part.trackable %} - + {% if part.active %} + + {% if roles.stock.change %} + {% endif %} {% if part.purchaseable %} - - {% endif %} - {% if part.salable %} - - {% endif %} -
- - {% if not part.active %} -
- {% trans 'Inactive' %} -
- {% endif %} -

-

- -
- - - {% 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 %} -
-
-
- -
- {% if part.virtual %} -
- {% trans "This is a virtual part" %} -
- {% endif %} - {% if part.variant_of %} -
- {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} - {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} -
- {% endif %} -
-
-
- - - {% if part.description %} - - - - {% endif %} - {% if part.revision %} - - - - - - {% endif %} - {% if part.keywords %} - - - - - - {% endif %} - {% if part.link %} - - - - - - {% endif %} - - - - - - {% if part.trackable and part.getLatestSerialNumber %} - - - - - - {% endif %} - {% if part.default_location %} - - - - - - {% endif %} - {% if part.default_supplier %} - - - - - - {% endif %} - - - - - - - - - - - {% if on_order > 0 %} - - - - - - {% endif %} - {% if required_build_order_quantity > 0 %} - - - - - {% endif %} - {% if required_sales_order_quantity > 0 %} - - - - - {% endif %} - {% if allocated > 0 %} - - - - - - {% endif %} + {% endif %} + {% endif %} + + {% if roles.part.add or roles.part.change or roles.part.delete %} +
+ + +
+ {% endif %} + + + +
+ {% if part.variant_of %} +
+ {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} + {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} +
+ {% endif %} +
+ +
+
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} - {{ part.creation_date }} - {% if part.creation_user %} - {{ part.creation_user }} {% endif %} -
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
{% 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 %}
+ + + + + + + + + + + + {% 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 %} + {% 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 %}

+

{% trans "Build Status" %}

+
{% trans "Can Build" %}{% decimal part.can_build %}
{% trans "Building" %}{% decimal quantity_being_built %}
+
+
+
+ + + + + {% if part.description %} + + + {% endif %} -
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
-
-
- + {% if part.revision %} + + + {% trans "Revision" %} + {{ part.revision }}{% include "clip.html"%} + + {% endif %} + {% if part.keywords %} + + + {% trans "Keywords" %} + {{ part.keywords }}{% include "clip.html"%} + + {% endif %} + {% if part.link %} + + + {% trans "External Link" %} + {{ part.link }}{% include "clip.html"%} + + {% endif %} + + + {% trans "Creation Date" %} + + {{ part.creation_date }} + {% if part.creation_user %} + {{ part.creation_user }} + {% endif %} + + + {% if part.trackable and part.getLatestSerialNumber %} + + + {% trans "Latest Serial Number" %} + {{ part.getLatestSerialNumber }}{% include "clip.html"%} + + {% endif %} + {% if part.default_location %} + + + {% trans "Default Location" %} + {{ part.default_location }} + + {% endif %} + {% if part.default_supplier %} + + + {% trans "Default Supplier" %} + {{ part.default_supplier }} + + {% endif %} +
{% block page_content %}