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:
4
InvenTree/templates/admin_button.html
Normal file
4
InvenTree/templates/admin_button.html
Normal 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>
|
@ -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) {
|
||||
|
@ -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'>
|
||||
|
Reference in New Issue
Block a user