From 292e29e95e2a9284cb57dee3b9d0974f48174c80 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 15 May 2019 07:50:54 +1000 Subject: [PATCH] Add some more secondary modals --- .../company/templates/company/detail_part.html | 8 ++++++++ InvenTree/part/templates/part/category.html | 16 +++++++++++++++- InvenTree/stock/templates/stock/location.html | 10 +++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/InvenTree/company/templates/company/detail_part.html b/InvenTree/company/templates/company/detail_part.html index 5d01f1b10e..b3213d5993 100644 --- a/InvenTree/company/templates/company/detail_part.html +++ b/InvenTree/company/templates/company/detail_part.html @@ -33,6 +33,14 @@ supplier: {{ company.id }} }, reload: true, + secondary: [ + { + field: 'part', + label: 'New Part', + title: 'Create New Part', + url: "{% url 'part-create' %}" + }, + ] }); }); diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 3abef26af9..e37062beb6 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -73,8 +73,22 @@ {% if category %} data: { category: {{ category.id }} - } + }, {% endif %} + secondary: [ + { + field: 'default_location', + label: 'New Location', + title: 'Create new location', + url: "{% url 'stock-location-create' %}", + }, + { + field: 'parent', + label: 'New Category', + title: 'Create new category', + url: "{% url 'category-create' %}", + }, + ] }); }) diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index f05b14c77b..c6857d9b9f 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -80,7 +80,15 @@ location: {{ location.id }} {% endif %} }, - follow: true + follow: true, + secondary: [ + { + field: 'parent', + label: 'New Location', + title: 'Create new location', + url: "{% url 'stock-location-create' %}", + }, + ] }); return false; });