diff --git a/InvenTree/part/templates/part/stock_count.html b/InvenTree/part/templates/part/stock_count.html
index 4209b80bb6..e12c9bd7b7 100644
--- a/InvenTree/part/templates/part/stock_count.html
+++ b/InvenTree/part/templates/part/stock_count.html
@@ -4,7 +4,7 @@
{% decimal total_stock %}
{% if total_stock == 0 %}
-
{% endif %}
\ No newline at end of file
diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html
index 9efd71e9bc..5a58e2e04f 100644
--- a/InvenTree/stock/templates/stock/item_base.html
+++ b/InvenTree/stock/templates/stock/item_base.html
@@ -13,9 +13,105 @@
{% endblock %}
{% block heading %}
-
+ {% trans "Stock Item" %}: {{ item.part.full_name}}
+{% endblock %}
+
+{% block actions %}
+
+{% if user.is_staff and roles.stock.change %}
+{% url 'admin:stock_stockitem_change' item.pk as url %}
+{% include "admin_button.html" with url=url %}
+{% endif %}
+{% if barcodes %}
+
+
+
+
+{% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %}
+ {% if roles.stock.change and not item.is_building %}
+
+ {% endif %}
+
+ {% if roles.stock.change and not item.is_building %}
+
+ {% endif %}
+{% endif %}
{% endblock %}
{% block thumbnail %}
@@ -29,19 +125,6 @@
{% authorized_owners item.owner as owners %}
{% endif %}
-
diff --git a/InvenTree/stock/templates/stock/loc_link.html b/InvenTree/stock/templates/stock/loc_link.html
index 6e5b329b73..23abbb9df3 100644
--- a/InvenTree/stock/templates/stock/loc_link.html
+++ b/InvenTree/stock/templates/stock/loc_link.html
@@ -1,6 +1,5 @@
{% load i18n %}
-
{% trans "Stock" %}
{% if location %}
{% for path_item in location.parentpath %}
diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html
index c318c1478c..7dfd4e3025 100644
--- a/InvenTree/stock/templates/stock/location.html
+++ b/InvenTree/stock/templates/stock/location.html
@@ -7,79 +7,84 @@
{% include "stock/location_sidebar.html" %}
{% endblock %}
-{% block details_left %}
+{% block heading %}
{% if location %}
-
- {% trans "Stock Location" %}: {{ location.name }}
- {% if user.is_staff and roles.stock_location.change %}
-
- {% endif %}
-
-
{{ location.description }}
+{% trans "Stock Location" %}: {{ location.name }}
{% else %}
-
- {% trans "Stock" %}
-
-
{% trans "Top level stock location" %}
+{% trans "Stock" %}
+{% endif %}
+{% endblock %}
+
+{% block actions %}
+
+{% if location and user.is_staff and roles.stock_location.change %}
+{% url 'admin:stock_stocklocation_change' location.pk as url %}
+{% include "admin_button.html" with url=url %}
{% endif %}
+{% if barcodes %}
+
+{% if location %}
- {% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser or not location %}
- {% if roles.stock_location.add %}
-
- {% endif %}
- {% endif %}
- {% if barcodes %}
-
- {% if location %}
-
-
-
-
-
- {% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %}
- {% if roles.stock.change %}
-
-
-
-
- {% endif %}
- {% if roles.stock_location.change %}
-
-
-
-
- {% endif %}
- {% endif %}
- {% endif %}
- {% endif %}
+
+
+
+{% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %}
+{% if roles.stock.change %}
+
+
+
+
+{% endif %}
+{% if roles.stock_location.change %}
+
+
+
+
+{% endif %}
+{% endif %}
+{% endif %}
+{% endif %}
+{% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser or not location %}
+{% if roles.stock_location.add %}
+
+{% endif %}
+{% endif %}
+{% endblock %}
+
+{% block details_left %}
+{% if location %}
+
{{ location.description }}
+{% else %}
+
{% trans "Top level stock location" %}
+{% endif %}
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
{% if owner_control.value == "True" %}
diff --git a/InvenTree/templates/admin_button.html b/InvenTree/templates/admin_button.html
new file mode 100644
index 0000000000..7186246e4a
--- /dev/null
+++ b/InvenTree/templates/admin_button.html
@@ -0,0 +1,4 @@
+{% load i18n %}
+
\ No newline at end of file
diff --git a/InvenTree/templates/js/dynamic/inventree.js b/InvenTree/templates/js/dynamic/inventree.js
index dcff1ec77f..0172e47706 100644
--- a/InvenTree/templates/js/dynamic/inventree.js
+++ b/InvenTree/templates/js/dynamic/inventree.js
@@ -190,6 +190,13 @@ function inventreeDocReady() {
$('.brand-icon').each(function(i, obj) {
loadBrandIcon($(this), $(this).attr('brand_name'));
});
+
+ // Callback for "admin view" button
+ $('#admin-button').click(function() {
+ var url = $(this).attr('url');
+
+ location.href = url;
+ });
}
function isFileTransfer(transfer) {
diff --git a/InvenTree/templates/page_base.html b/InvenTree/templates/page_base.html
index 616731da6f..92130ea7a3 100644
--- a/InvenTree/templates/page_base.html
+++ b/InvenTree/templates/page_base.html
@@ -6,6 +6,21 @@
{% block content %}
+
+
+
+ {% block heading %}
+ -- page header goes here --
+ {% endblock %}
+
+
+
+ {% block actions %}
+ -- actions go here --
+ {% endblock %}
+
+
+