From 9e8be487d3dcb43c6d8ff5961912b7848b15f0f5 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 22 Apr 2024 22:47:32 +0200 Subject: [PATCH 1/5] add intrestials to CUI --- src/backend/InvenTree/config_template.yaml | 1 + .../templates/InvenTree/settings/global.html | 2 ++ .../templates/InvenTree/settings/login.html | 2 ++ .../templates/InvenTree/settings/plugin.html | 2 ++ .../InvenTree/templates/account/login.html | 2 ++ .../InvenTree/templates/pui_intrestial.html | 17 +++++++++++++++++ 6 files changed, 26 insertions(+) create mode 100644 src/backend/InvenTree/templates/pui_intrestial.html diff --git a/src/backend/InvenTree/config_template.yaml b/src/backend/InvenTree/config_template.yaml index e429aa2bea40..57e81876d824 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_intrestial: 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..0bed43e657e7 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_intrestial.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..e110901a74fc 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_intrestial.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..3feaf5d422dd 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_intrestial.html" with mode='admin' %} +
diff --git a/src/backend/InvenTree/templates/account/login.html b/src/backend/InvenTree/templates/account/login.html index b31b183b316d..53145389e596 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_intrestial.html" with mode='user' %} +

{% trans "Sign In" %}

{% include "spacer.html" %} diff --git a/src/backend/InvenTree/templates/pui_intrestial.html b/src/backend/InvenTree/templates/pui_intrestial.html new file mode 100644 index 000000000000..6427564e062e --- /dev/null +++ b/src/backend/InvenTree/templates/pui_intrestial.html @@ -0,0 +1,17 @@ +{% load inventree_extras %} +{% load i18n %} + +{% inventree_customize 'hide_pui_intrestial' 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 %} From 5af057e21962cd8fe920328b31810f614988fd23 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 22 Apr 2024 22:51:24 +0200 Subject: [PATCH 2/5] Add intrestial to report settings --- src/backend/InvenTree/templates/InvenTree/settings/report.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/InvenTree/templates/InvenTree/settings/report.html b/src/backend/InvenTree/templates/InvenTree/settings/report.html index 683625bd74ba..1c782821e327 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_intrestial.html" with mode='admin' %} +
{% include "InvenTree/settings/setting.html" with key="REPORT_ENABLE" icon="fa-file-pdf" %} From a77f89c7a42a0761e360694a668034b3fe9d7538 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 22 Apr 2024 23:56:38 +0200 Subject: [PATCH 3/5] add option to docs --- docs/docs/start/config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 7ce2e9678429..04c014441dbe 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_intrestial | Disable PUI intrestial | 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). From 0ed8cd2326e4983ab557067e66b9d49ea4bb83cc Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 23 Apr 2024 07:36:46 +0200 Subject: [PATCH 4/5] rename to banner Fixes #6554 Co-authored-by: Oliver --- docs/docs/start/config.md | 2 +- src/backend/InvenTree/config_template.yaml | 2 +- src/backend/InvenTree/templates/InvenTree/settings/global.html | 2 +- src/backend/InvenTree/templates/InvenTree/settings/login.html | 2 +- src/backend/InvenTree/templates/InvenTree/settings/plugin.html | 2 +- src/backend/InvenTree/templates/InvenTree/settings/report.html | 2 +- src/backend/InvenTree/templates/account/login.html | 2 +- .../templates/{pui_intrestial.html => pui_banner.html} | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/backend/InvenTree/templates/{pui_intrestial.html => pui_banner.html} (89%) diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 04c014441dbe..9d9bfd3674e7 100644 --- a/docs/docs/start/config.md +++ b/docs/docs/start/config.md @@ -324,7 +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_intrestial | Disable PUI intrestial | False | +| INVENTREE_CUSTOMIZE | customize.hide_pui_banner | Disable PUI intrestial | 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 57e81876d824..8e4efeb54c25 100644 --- a/src/backend/InvenTree/config_template.yaml +++ b/src/backend/InvenTree/config_template.yaml @@ -300,7 +300,7 @@ remote_login_header: HTTP_REMOTE_USER # hide_password_reset: true # logo: img/custom_logo.png # splash: img/custom_splash.jpg -# hide_pui_intrestial: true +# 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 0bed43e657e7..983700591dd4 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/global.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/global.html @@ -10,7 +10,7 @@ {% block content %} -{% include "pui_intrestial.html" with mode='admin' %} +{% include "pui_banner.html" with mode='admin' %}
diff --git a/src/backend/InvenTree/templates/InvenTree/settings/login.html b/src/backend/InvenTree/templates/InvenTree/settings/login.html index e110901a74fc..d2b557978c4d 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/login.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/login.html @@ -16,7 +16,7 @@ {% endif %} -{% include "pui_intrestial.html" with mode='admin' %} +{% include "pui_banner.html" with mode='admin' %}
diff --git a/src/backend/InvenTree/templates/InvenTree/settings/plugin.html b/src/backend/InvenTree/templates/InvenTree/settings/plugin.html index 3feaf5d422dd..f97c98795e6a 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/plugin.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/plugin.html @@ -15,7 +15,7 @@ {% trans "Changing the settings below require you to immediately restart the server. Do not change this while under active usage." %} -{% include "pui_intrestial.html" with mode='admin' %} +{% 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 1c782821e327..6622befc3615 100644 --- a/src/backend/InvenTree/templates/InvenTree/settings/report.html +++ b/src/backend/InvenTree/templates/InvenTree/settings/report.html @@ -10,7 +10,7 @@ {% block content %} -{% include "pui_intrestial.html" with mode='admin' %} +{% include "pui_banner.html" with mode='admin' %}
diff --git a/src/backend/InvenTree/templates/account/login.html b/src/backend/InvenTree/templates/account/login.html index 53145389e596..71b570a4d899 100644 --- a/src/backend/InvenTree/templates/account/login.html +++ b/src/backend/InvenTree/templates/account/login.html @@ -13,7 +13,7 @@ {% inventree_customize 'login_message' as login_message %} {% mail_configured as mail_conf %} -{% include "pui_intrestial.html" with mode='user' %} +{% include "pui_banner.html" with mode='user' %}

{% trans "Sign In" %}

diff --git a/src/backend/InvenTree/templates/pui_intrestial.html b/src/backend/InvenTree/templates/pui_banner.html similarity index 89% rename from src/backend/InvenTree/templates/pui_intrestial.html rename to src/backend/InvenTree/templates/pui_banner.html index 6427564e062e..d6eb0746f35b 100644 --- a/src/backend/InvenTree/templates/pui_intrestial.html +++ b/src/backend/InvenTree/templates/pui_banner.html @@ -1,7 +1,7 @@ {% load inventree_extras %} {% load i18n %} -{% inventree_customize 'hide_pui_intrestial' as hidden %} +{% inventree_customize 'hide_pui_banner' as hidden %} {% if not hidden %}
From 819194a6914311c0fa249da1ec900160f4cdb748 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 23 Apr 2024 12:38:27 +0200 Subject: [PATCH 5/5] change name --- docs/docs/start/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 9d9bfd3674e7..56d8f06347ef 100644 --- a/docs/docs/start/config.md +++ b/docs/docs/start/config.md @@ -324,7 +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 intrestial | False | +| 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).