Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PUI info banner to CUI #7097

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/start/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
1 change: 1 addition & 0 deletions src/backend/InvenTree/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

{% block content %}

{% include "pui_banner.html" with mode='admin' %}

<table class='table table-striped table-condensed'>
<tbody>
{% include "InvenTree/settings/setting.html" with key="INVENTREE_COMPANY_NAME" icon="fa-building" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
</div>
{% endif %}

{% include "pui_banner.html" with mode='admin' %}

<table class='table table-striped table-condensed'>
<tbody>
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_PWD_FORGOT" icon="fa-user-lock" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
{% trans "Changing the settings below require you to immediately restart the server. Do not change this while under active usage." %}
</div>

{% include "pui_banner.html" with mode='admin' %}

<div class='table-responsive'>
<table class='table table-striped table-condensed'>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

{% block content %}

{% include "pui_banner.html" with mode='admin' %}

<table class='table table-striped table-condensed'>
<tbody>
{% include "InvenTree/settings/setting.html" with key="REPORT_ENABLE" icon="fa-file-pdf" %}
Expand Down
2 changes: 2 additions & 0 deletions src/backend/InvenTree/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
{% inventree_customize 'login_message' as login_message %}
{% mail_configured as mail_conf %}

{% include "pui_banner.html" with mode='user' %}

<div class='d-flex flex-wrap'>
<h3>{% trans "Sign In" %}</h3>
{% include "spacer.html" %}
Expand Down
17 changes: 17 additions & 0 deletions src/backend/InvenTree/templates/pui_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% load inventree_extras %}
{% load i18n %}

{% inventree_customize 'hide_pui_banner' as hidden %}

{% if not hidden %}
<div class='alert alert-block alert-warning'>
{% 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 %}
<br>
{% trans "Try it out now" %} <a href="{% url 'platform' %}"/>{% trans "here" %}</a>.
</div>
{% endif %}
Loading