mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
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
This commit is contained in:
@ -25,10 +25,9 @@
|
||||
|
||||
{% block actions %}
|
||||
|
||||
{% if user.is_staff and roles.stock.change %}
|
||||
{% url 'admin:stock_stockitem_change' item.pk as url %}
|
||||
{% admin_url user "stock.stockitem" item.pk as url %}
|
||||
{% include "admin_button.html" with url=url %}
|
||||
{% endif %}
|
||||
|
||||
{% mixin_available "locate" as locate_available %}
|
||||
{% if plugins_enabled and locate_available %}
|
||||
<button id='locate-item-button' title='{% trans "Locate stock item" %}' class='btn btn-outline-secondary' typy='button'>
|
||||
|
@ -28,10 +28,11 @@
|
||||
{% block actions %}
|
||||
|
||||
<!-- Admin view -->
|
||||
{% if location and user.is_staff and roles.stock_location.change %}
|
||||
{% url 'admin:stock_stocklocation_change' location.pk as url %}
|
||||
{% if location %}
|
||||
{% admin_url user "stock.stocklocation" location.pk as url %}
|
||||
{% include "admin_button.html" with url=url %}
|
||||
{% endif %}
|
||||
|
||||
{% settings_value "STOCKTAKE_ENABLE" as stocktake_enable %}
|
||||
{% if stocktake_enable and roles.stocktake.add %}
|
||||
<button type='button' class='btn btn-outline-secondary' id='location-stocktake' title='{% trans "Perform stocktake for this stock location" %}'>
|
||||
|
Reference in New Issue
Block a user