enable multiple admin buttons on one page

This commit is contained in:
Matthias 2021-11-13 00:37:18 +01:00
parent 8c82d2f900
commit 7e478c332a
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ function inventreeDocReady() {
}); });
// Callback for "admin view" button // Callback for "admin view" button
$('#admin-button').click(function() { $('#admin-button, .admin-button').click(function() {
var url = $(this).attr('url'); var url = $(this).attr('url');
location.href = url; location.href = url;

View File

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