2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Merge pull request #2886 from SchrodingersGat/remove-demo-mode

Remove "demo mode"
This commit is contained in:
Oliver
2022-04-28 14:13:16 +10:00
committed by GitHub
10 changed files with 16 additions and 82 deletions

View File

@ -13,15 +13,15 @@
{% endblock %}
{% block actions %}
{% inventree_demo_mode as demo %}
{% if not demo %}
{% inventree_customize 'hide_password_reset' as hide_password_reset %}
{% if not hide_password_reset %}
<div class='btn btn-outline-primary' type='button' id='edit-password' title='{% trans "Change Password" %}'>
<span class='fas fa-key'></span> {% trans "Set Password" %}
</div>
{% endif %}
<div class='btn btn-primary' type='button' id='edit-user' title='{% trans "Edit User Information" %}'>
<span class='fas fa-user-cog'></span> {% trans "Edit" %}
</div>
{% endif %}
{% endblock %}
{% block content %}

View File

@ -12,7 +12,6 @@
{% settings_value 'LOGIN_ENABLE_SSO' as enable_sso %}
{% inventree_customize 'login_message' as login_message %}
{% mail_configured as mail_conf %}
{% inventree_demo_mode as demo %}
<h1>{% trans "Sign In" %}</h1>
@ -37,12 +36,12 @@ for a account and sign in below:{% endblocktrans %}</p>
<hr>
{% if login_message %}
<div>{{ login_message }}<hr></div>
<div>{{ login_message | safe }}<hr></div>
{% endif %}
<div class="btn-group float-right" role="group">
<button class="btn btn-success" type="submit">{% trans "Sign In" %}</button>
</div>
{% if mail_conf and enable_pwd_forgot and not demo %}
{% if mail_conf and enable_pwd_forgot %}
<a class="" href="{% url 'account_reset_password' %}"><small>{% trans "Forgot Password?" %}</small></a>
{% endif %}
</form>

View File

@ -8,7 +8,6 @@
{% settings_value "SERVER_RESTART_REQUIRED" as server_restart_required %}
{% settings_value "LABEL_ENABLE" with user=user as labels_enabled %}
{% inventree_show_about user as show_about %}
{% inventree_demo_mode as demo_mode %}
<!DOCTYPE html>
<html lang="en">
@ -94,7 +93,7 @@
{% block alerts %}
<div class='notification-area' id='alerts'>
<!-- Div for displayed alerts -->
{% if server_restart_required and not demo_mode %}
{% if server_restart_required %}
<div id='alert-restart-server' class='alert alert-danger' role='alert'>
<span class='fas fa-server'></span>
<strong>{% trans "Server Restart Required" %}</strong>

View File

@ -6,9 +6,10 @@
{% settings_value 'BARCODE_ENABLE' as barcodes %}
{% settings_value 'STICKY_HEADER' user=request.user as sticky %}
{% navigation_enabled as plugin_nav %}
{% inventree_demo_mode as demo %}
{% inventree_show_about user as show_about %}
{% inventree_customize 'navbar_message' as navbar_message %}
{% inventree_customize 'hide_admin_link' as hide_admin_link %}
<nav class="navbar {% if sticky %}fixed-top{% endif %} navbar-expand-lg navbar-light">
<div class="container-fluid">
@ -89,7 +90,7 @@
{% if navbar_message %}
{% include "spacer.html" %}
<div class='flex justify-content-center'>
{{ navbar_message }}
{{ navbar_message | safe }}
</div>
{% include "spacer.html" %}
{% include "spacer.html" %}
@ -132,7 +133,7 @@
</a>
<ul class='dropdown-menu dropdown-menu-end inventree-navbar-menu'>
{% if user.is_authenticated %}
{% if user.is_staff and not demo %}
{% if user.is_staff and not hide_admin_link %}
<li><a class='dropdown-item' href="{% url 'admin:index' %}"><span class="fas fa-user-shield"></span> {% trans "Admin" %}</a></li>
{% endif %}
<li><a class='dropdown-item' href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>

View File

@ -87,31 +87,4 @@
<!-- TODO - Enumerate system issues here! -->
{% endfor %}
{% endif %}
<tr>
<td colspan='3'><strong>{% trans "Parts" %}</strong></td>
</tr>
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Part Categories" %}</td>
<td>{{ part_cat_count }}</td>
</tr>
<tr>
<td><span class='fas fa-shapes'></span></td>
<td>{% trans "Parts" %}</td>
<td>{{ part_count }}</td>
</tr>
<tr>
<td colspan="3"><strong>{% trans "Stock Items" %}</strong></td>
</tr>
<tr>
<td><span class='fas fa-map-marker-alt'></span></td>
<td>{% trans "Stock Locations" %}</td>
<td>{{ stock_loc_count }}</td>
</tr>
<tr>
<td><span class='fas fa-boxes'></span></td>
<td>{% trans "Stock Items" %}</td>
<td>{{ stock_item_count }}</td>
</tr>
</table>