2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00
InvenTree/InvenTree/templates/admin_button.html
Oliver b335728e29
Fix admin site - Custom admin URL (#5766)
* Update config template file

* Add entry to docs

* Add INVENTREE_ADMIN_ENABLED to settings.py

* Add helper functions for improving admin links

* Refactor existing admin links

* remove debug statements

* Fix custom admin URL

* Expand documentation

* Fix URL

* Improve wording in config_template.yaml

* Extend admin_url tag

- Allow lookup without pk
- Handle case where pk not found
2023-10-21 22:12:14 +11:00

13 lines
397 B
HTML

{% load inventree_extras %}
{% load i18n %}
{% inventree_customize 'hide_admin_link' as hidden %}
{% if url and not hidden and user.is_staff %}
<a href='{{ url }}'>
<button id='admin-button' href='{{ url }}' title='{% trans "View in administration panel" %}' type='button' class='btn btn-primary admin-button'>
<span class='fas fa-user-shield'></span>
</button>
</a>
{% endif %}