set navbar message via config file

This commit is contained in:
Matthias 2022-04-24 15:12:03 +02:00
parent 1127bf2497
commit f2d0537198
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
3 changed files with 9 additions and 14 deletions

View File

@ -189,3 +189,5 @@ static_root: '/home/inventree/data/static'
# customize:
# login_message: |
# InvenTree demo instance - <a href='https://inventree.readthedocs.io/en/latest/demo/'> Click here for login details</a>
# navbar_message: |
# InvenTree demo mode <a href='https://inventree.readthedocs.io/en/latest/demo/'><span class='fas fa-info-circle'></span></a>

View File

@ -8,6 +8,7 @@
{% navigation_enabled as plugin_nav %}
{% inventree_demo_mode as demo %}
{% inventree_show_about user as show_about %}
{% inventree_customize 'navbar_message' as navbar_message %}
<nav class="navbar {% if sticky %}fixed-top{% endif %} navbar-expand-lg navbar-light">
<div class="container-fluid">
@ -85,8 +86,12 @@
</ul>
</div>
{% if demo %}
{% include "navbar_demo.html" %}
{% if navbar_message %}
{% include "spacer.html" %}
<div class='flex'>
{{ navbar_message|markdownify }}
</div>
{% include "spacer.html" %}
{% endif %}
<ul class='navbar-nav flex-row'>

View File

@ -1,12 +0,0 @@
{% load i18n %}
{% include "spacer.html" %}
<div class='flex'>
<h6>
{% trans "InvenTree demo mode" %}
<a href='https://inventree.readthedocs.io/en/latest/demo/'>
<span class='fas fa-info-circle'></span>
</a>
</h6>
</div>
{% include "spacer.html" %}
{% include "spacer.html" %}