2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 13:35:40 +00:00

Refactor admin button for:

- build order
- part detail
- stock item
- stock location
- company detail
- manufacturer-part
- purchase order
- sales order
This commit is contained in:
Oliver
2021-10-29 17:07:35 +11:00
parent 8afa39cd91
commit b41d1aed12
17 changed files with 586 additions and 541 deletions

View File

@ -0,0 +1,4 @@
{% load i18n %}
<button id='admin-button' title='{% trans "View in administration panel" %}' type='button' class='btn btn-primary' url='{{ url }}'>
<span class='fas fa-user-shield'></span>
</button>

View File

@ -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) {

View File

@ -6,6 +6,21 @@
{% block content %}
<div class='panel'>
<div class='panel-heading'>
<div class='d-flex flex-row'>
<h4>
{% block heading %}
<i>-- page header goes here --</i>
{% endblock %}
</h4>
<span class='flex' style='flex-grow: 1;'></span>
<div id='page-actions' class='btn-group' role='group'>
{% block actions %}
<i>-- actions go here --</i>
{% endblock %}
</div>
</div>
</div>
<div class='panel-content'>
<div class='row'>
<div class='col-sm-6' id='detail-panel-left'>