From 7cd345aeb570dead59f7c330be38c758ec7ed95b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 18 May 2021 19:19:43 +1000 Subject: [PATCH] Change location of 'banner' messages - Place them inside the main panel - Generally underneath the thumbnail --- InvenTree/InvenTree/static/css/inventree.css | 1 + .../build/templates/build/build_base.html | 78 +++++++++++-------- .../templates/order/sales_order_base.html | 14 ++-- InvenTree/part/templates/part/part_base.html | 16 ++-- 4 files changed, 62 insertions(+), 47 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 5271a9b362..0aab04f941 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -907,6 +907,7 @@ input[type="submit"] { .info-messages .alert { padding: 5px; + margin-bottom: 10px; } .part-allocation { diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html index 177fad8d6c..2376daf0cf 100644 --- a/InvenTree/build/templates/build/build_base.html +++ b/InvenTree/build/templates/build/build_base.html @@ -9,44 +9,54 @@ {% inventree_title %} | {% trans "Build Order" %} - {{ build }} {% endblock %} +{% block below_thumbnail %} + +
+ {% if build.sales_order %} +
+ {% object_link 'so-detail' build.sales_order.id build.sales_order as link %} + {% blocktrans %}This Build Order is allocated to Sales Order {{link}}{% endblocktrans %} +
+ {% endif %} + + {% if build.parent %} +
+ {% object_link 'build-detail' build.parent.id build.parent as link %} + {% blocktrans %}This Build Order is a child of Build Order {{link}}{% endblocktrans %} +
+ {% endif %} + + {% if build.active %} + {% if build.can_complete %} +
+ {% trans "Build Order is ready to mark as completed" %} +
+ {% endif %} + {% if build.incomplete_count > 0 %} +
+ {% trans "Build Order cannot be completed as outstanding outputs remain" %} +
+ {% endif %} + {% if build.completed < build.quantity %} +
+ {% trans "Required build quantity has not yet been completed" %} +
+ {% endif %} + {% if not build.areUntrackedPartsFullyAllocated %} +
+ {% trans "Stock has not been fully allocated to this Build Order" %} +
+ {% endif %} + {% endif %} +
+{% endblock %} + {% block header_pre_content %} -{% if build.sales_order %} -
- {% object_link 'so-detail' build.sales_order.id build.sales_order as link %} - {% blocktrans %}This Build Order is allocated to Sales Order {{link}}{% endblocktrans %} -
-{% endif %} -{% if build.parent %} -
- {% object_link 'build-detail' build.parent.id build.parent as link %} - {% blocktrans %}This Build Order is a child of Build Order {{link}}{% endblocktrans %} -
-{% endif %} + {% endblock %} {% block header_post_content %} -{% if build.active %} -{% if build.can_complete %} -
- {% trans "Build Order is ready to mark as completed" %} -
-{% endif %} -{% if build.incomplete_count > 0 %} -
- {% trans "Build Order cannot be completed as outstanding outputs remain" %} -
-{% endif %} -{% if build.completed < build.quantity %} -
- {% trans "Required build quantity has not yet been completed" %} -
-{% endif %} -{% if not build.areUntrackedPartsFullyAllocated %} -
- {% trans "Stock has not been fully allocated to this Build Order" %} -
-{% endif %} -{% endif %} + {% endblock %} {% block thumbnail %} diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index 45bcc76244..d3f4ba74a2 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -9,13 +9,15 @@ {% inventree_title %} | {% trans "Sales Order" %} {% endblock %} -{% block pre_content %} -{% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %} -
- {% trans "This SalesOrder has not been fully allocated" %} +{% block below_thumbnail %} +
+ {% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %} +
+ {% trans "This Sales Order has not been fully allocated" %} +
+ {% endif %}
-{% endif %} -{% endblock %} + {% endblock %} {% block thumbnail %} -{% if part.variant_of %} -
- {% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %} - {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} -
-{% endif %} -
{% include "part/part_thumb.html" %} @@ -107,6 +100,15 @@
+ +
+ {% if part.variant_of %} +
+ {% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %} + {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} +
+ {% endif %} +