From 1b5428718e702224588e3afe544aa7acb049dd52 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 29 Oct 2021 01:11:00 +1100 Subject: [PATCH] Refactored sidebar for "purchase order" --- .../order/templates/order/po_navbar.html | 36 ------------------- .../order/templates/order/po_sidebar.html | 8 +++++ .../order/purchase_order_detail.html | 14 ++------ 3 files changed, 11 insertions(+), 47 deletions(-) delete mode 100644 InvenTree/order/templates/order/po_navbar.html create mode 100644 InvenTree/order/templates/order/po_sidebar.html diff --git a/InvenTree/order/templates/order/po_navbar.html b/InvenTree/order/templates/order/po_navbar.html deleted file mode 100644 index bddcce4ba3..0000000000 --- a/InvenTree/order/templates/order/po_navbar.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} -{% load static %} -{% load inventree_extras %} -{% load status_codes %} - - \ No newline at end of file diff --git a/InvenTree/order/templates/order/po_sidebar.html b/InvenTree/order/templates/order/po_sidebar.html new file mode 100644 index 0000000000..d5b7727e5c --- /dev/null +++ b/InvenTree/order/templates/order/po_sidebar.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% load static %} +{% load inventree_extras %} + +{% include "sidebar_item.html" with label='order-items' text="Line Items" icon="fa-list-ol" %} +{% include "sidebar_item.html" with label='received-items' text="Received Stock" icon="fa-sign-in-alt" %} +{% include "sidebar_item.html" with label='order-attachments' text="Attachments" icon="fa-paperclip" %} +{% include "sidebar_item.html" with label='order-notes' text="Notes" icon="fa-clipboard" %} \ No newline at end of file diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 5424771a37..347d6b7389 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -6,8 +6,8 @@ {% load static %} {% load markdownify %} -{% block menubar %} -{% include 'order/po_navbar.html' %} +{% block sidebar %} +{% include 'order/po_sidebar.html' %} {% endblock %} {% block page_content %} @@ -89,11 +89,6 @@ {{ block.super }} - enableNavbar({ - label: 'po', - toggleId: '#po-menu-toggle', - }); - $('#edit-notes').click(function() { constructForm('{% url "api-po-detail" order.pk %}', { fields: { @@ -249,9 +244,6 @@ loadPurchaseOrderLineItemTable('#po-line-table', { {% endif %} }); -attachNavCallbacks({ - name: 'purchase-order', - default: 'order-items' -}); +enableSidebar('purchaseorder'); {% endblock %} \ No newline at end of file