Add PUI info banner to CUI (#7097)

* add intrestials to CUI

* Add intrestial to report settings

* add option to docs

* rename to banner
Fixes #6554

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>

* change name

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
Matthias Mair 2024-04-23 13:05:48 +02:00 committed by GitHub
parent df36f902fa
commit 37956db5fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 29 additions and 0 deletions

View File

@ -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).

View File

@ -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

View File

@ -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" %}

View File

@ -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" %}

View File

@ -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>

View File

@ -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" %}

View File

@ -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" %}

View File

@ -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 %}