From 53c579c992dd43fb163f65055dea4faf2ccdc52b Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 27 Oct 2021 23:03:08 +1100 Subject: [PATCH] Refactor PO and SO pages --- .../order/templates/order/order_base.html | 90 ++++++++-------- .../templates/order/sales_order_base.html | 101 +++++++++--------- InvenTree/templates/two_column.html | 90 ---------------- 3 files changed, 91 insertions(+), 190 deletions(-) delete mode 100644 InvenTree/templates/two_column.html diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 06ec079507..3300ce3b3d 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -1,4 +1,4 @@ -{% extends "two_column.html" %} +{% extends "page_base.html" %} {% load i18n %} {% load static %} @@ -24,65 +24,61 @@ src="{% static 'img/blank_image.png' %}" /> {% endblock %} -{% block page_data %} -

- {% trans "Purchase Order" %} {{ order.reference }} +{% block details %} +

+ {% trans "Purchase Order" %}: {{ order.reference }} {% if user.is_staff and roles.purchase_order.change %} {% endif %} -

-

+

+

{% purchase_order_status_label order.status large=True %} {% if order.is_overdue %} {% trans "Overdue" %} {% endif %} -

-
+

{{ order.description }}{% include "clip.html"%}

-
-
- - - {% if roles.purchase_order.change %} - -
- - -
- {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} - - {% elif order.status == PurchaseOrderStatus.PLACED %} - - - {% endif %} - {% endif %} +
+ {% if roles.purchase_order.change %} + +
+ + +
+ {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} + + {% elif order.status == PurchaseOrderStatus.PLACED %} + + + {% endif %} + {% endif %}
{% endblock %} -{% block page_details %} -

{% trans "Purchase Order Details" %}

+{% block details_right %} diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index 5a4fe347e8..d7113e6591 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -1,4 +1,4 @@ -{% extends "two_column.html" %} +{% extends "page_base.html" %} {% load i18n %} {% load static %} @@ -14,16 +14,6 @@ {% endblock %} -{% block below_thumbnail %} -
- {% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %} -
- {% trans "This Sales Order has not been fully allocated" %} -
- {% endif %} -
- {% endblock %} - {% block thumbnail %} {% endblock %} -{% block page_data %} +{% block details %} -

+

{% trans "Sales Order" %} {{ order.reference }} {% if user.is_staff and roles.sales_order.change %} {% endif %} -

-

+

+

{% sales_order_status_label order.status large=True %} {% if order.is_overdue %} {% trans "Overdue" %} {% endif %} -

-
+

{{ order.description }}{% include "clip.html"%}

-
-
- - - {% if roles.sales_order.change %} - -
- - - -
- {% if order.status == SalesOrderStatus.PENDING %} - - {% endif %} - {% endif %} +
+ {% if roles.sales_order.change %} + +
+ + + +
+ {% if order.status == SalesOrderStatus.PENDING %} + + {% endif %} + {% endif %}
+{% block below_thumbnail %} +
+ {% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %} +
+ {% trans "This Sales Order has not been fully allocated" %} +
+ {% endif %} +
+ {% endblock %} {% endblock %} -{% block page_details %} -

{% trans "Sales Order Details" %}

+{% block details_right %}
diff --git a/InvenTree/templates/two_column.html b/InvenTree/templates/two_column.html deleted file mode 100644 index 2eab4bb62e..0000000000 --- a/InvenTree/templates/two_column.html +++ /dev/null @@ -1,90 +0,0 @@ -{% extends "base.html" %} - -{% load static %} -{% load i18n %} - -{% block menubar %} - -{% endblock %} - -{% block content %} - -{% block header_panel %} -
- -
- {% block detail_heading %} - !!! heading goes here !!! - {% endblock %} -
- -
- - {% block header_pre_content %} - {% endblock %} - -
-
-
- {% block thumbnail %} - - {% endblock %} -
-
- {% block page_data %} - - {% endblock %} -
- {% block below_thumbnail %} - {% endblock %} -
-
- {% block page_details %} - - {% endblock %} -
-
-
- - {% block header_post_content %} - {% endblock %} - -
-{% endblock %} - -{% block page_content %} - -{% block pre_content_panels %} -{% endblock %} - -{% block content_panels %} -
-
-

- {% block heading %} - - {% endblock %} -

-
- - {% block details_panel %} -
- {% block details %} - - {% endblock %} -
- {% endblock %} -
-{% endblock %} - -{% block post_content_panels %} -{% endblock %} - -{% endblock %} - -{% endblock %} - -{% block js_ready %} -{{ block.super }} - -{% endblock %} \ No newline at end of file