diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 7ce2e9678429..56d8f06347ef 100644 --- a/docs/docs/start/config.md +++ b/docs/docs/start/config.md @@ -324,6 +324,7 @@ The logo and custom messages can be changed/set: | INVENTREE_CUSTOM_SPLASH | customize.splash | Path to custom splash screen in the static files directory | *Not specified* | | INVENTREE_CUSTOMIZE | customize.login_message | Custom message for login page | *Not specified* | | INVENTREE_CUSTOMIZE | customize.navbar_message | Custom message for navbar | *Not specified* | +| INVENTREE_CUSTOMIZE | customize.hide_pui_banner | Disable PUI banner | False | If you want to remove the InvenTree branding as far as possible from your end-user also check the [global server settings](../settings/global.md#server-settings). diff --git a/src/backend/InvenTree/config_template.yaml b/src/backend/InvenTree/config_template.yaml index e429aa2bea40..8e4efeb54c25 100644 --- a/src/backend/InvenTree/config_template.yaml +++ b/src/backend/InvenTree/config_template.yaml @@ -300,6 +300,7 @@ remote_login_header: HTTP_REMOTE_USER # hide_password_reset: true # logo: img/custom_logo.png # splash: img/custom_splash.jpg +# hide_pui_banner: true # Set enabled frontends # Use the environment variable INVENTREE_CLASSIC_FRONTEND diff --git a/src/backend/InvenTree/templates/InvenTree/settings/global.html b/src/backend/InvenTree/templates/InvenTree/settings/global.html index d532bc572756..983700591dd4 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/global.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/global.html @@ -10,6 +10,8 @@ {% block content %} +{% include "pui_banner.html" with mode='admin' %} + {% include "InvenTree/settings/setting.html" with key="INVENTREE_COMPANY_NAME" icon="fa-building" %} diff --git a/src/backend/InvenTree/templates/InvenTree/settings/login.html b/src/backend/InvenTree/templates/InvenTree/settings/login.html index 2cdd7784f100..d2b557978c4d 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/login.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/login.html @@ -16,6 +16,8 @@ {% endif %} +{% include "pui_banner.html" with mode='admin' %} +
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_PWD_FORGOT" icon="fa-user-lock" %} diff --git a/src/backend/InvenTree/templates/InvenTree/settings/plugin.html b/src/backend/InvenTree/templates/InvenTree/settings/plugin.html index ea1cc4341ab8..f97c98795e6a 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/plugin.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/plugin.html @@ -15,6 +15,8 @@ {% trans "Changing the settings below require you to immediately restart the server. Do not change this while under active usage." %} +{% include "pui_banner.html" with mode='admin' %} +
diff --git a/src/backend/InvenTree/templates/InvenTree/settings/report.html b/src/backend/InvenTree/templates/InvenTree/settings/report.html index 683625bd74ba..6622befc3615 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/report.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/report.html @@ -10,6 +10,8 @@ {% block content %} +{% include "pui_banner.html" with mode='admin' %} +
{% include "InvenTree/settings/setting.html" with key="REPORT_ENABLE" icon="fa-file-pdf" %} diff --git a/src/backend/InvenTree/templates/account/login.html b/src/backend/InvenTree/templates/account/login.html index b31b183b316d..71b570a4d899 100644 --- a/src/backend/InvenTree/templates/account/login.html +++ b/src/backend/InvenTree/templates/account/login.html @@ -13,6 +13,8 @@ {% inventree_customize 'login_message' as login_message %} {% mail_configured as mail_conf %} +{% include "pui_banner.html" with mode='user' %} +

{% trans "Sign In" %}

{% include "spacer.html" %} diff --git a/src/backend/InvenTree/templates/pui_banner.html b/src/backend/InvenTree/templates/pui_banner.html new file mode 100644 index 000000000000..d6eb0746f35b --- /dev/null +++ b/src/backend/InvenTree/templates/pui_banner.html @@ -0,0 +1,17 @@ +{% load inventree_extras %} +{% load i18n %} + +{% inventree_customize 'hide_pui_banner' as hidden %} + +{% if not hidden %} +
+ {% if mode == 'admin' %} + {% trans "Platform UI - the new UI for InvenTree - provides more modern administration options." %} + {% endif %} + {% if mode == 'user' %} + {% trans "Platform UI - the new UI for InvenTree - is ready to be tested." %} + {% endif %} +
+ {% trans "Try it out now" %} {% trans "here" %}. +
+{% endif %}