Remove unused setting page

This commit is contained in:
Oliver Walters 2020-10-20 08:32:00 +11:00
parent 226a91718b
commit 7aa473712f
4 changed files with 3 additions and 50 deletions

View File

@ -77,7 +77,6 @@ settings_urls = [
url(r'^build/?', SettingsView.as_view(template_name='InvenTree/settings/build.html'), name='settings-build'),
url(r'^purchase-order/?', SettingsView.as_view(template_name='InvenTree/settings/po.html'), name='settings-po'),
url(r'^sales-order/?', SettingsView.as_view(template_name='InvenTree/settings/so.html'), name='settings-so'),
url(r'^other/?', SettingsView.as_view(template_name='InvenTree/settings/other.html'), name='settings-other'),
# Catch any other urls
url(r'^.*$', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings'),

View File

@ -39,6 +39,9 @@ class CommonConfig(AppConfig):
instance = InvenTreeSetting.objects.get(key='InstanceName')
instance_name = instance.value
# Delete the legacy key
instance.delete()
# Create new value
InvenTreeSetting.objects.create(
key='INVENTREE_INSTANCE',

View File

@ -1,44 +0,0 @@
{% extends "InvenTree/settings/settings.html" %}
{% load i18n %}
{% block tabs %}
{% include "InvenTree/settings/tabs.html" with tab='other' %}
{% endblock %}
{% block subtitle %}
{% trans "Other Settings" %}
{% endblock %}
{% block settings %}
<h4>InvenTree Settings</h4>
<table class='table table-striped table-condensed' id='other-table'>
<thead>
<tr>
<th>Setting</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for setting in settings %}
<tr>
<td>{{ setting.key }}</td>
<td>{{ setting.value }}</td>
<td>{{ setting.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block js_ready %}
{{ block.super }}
$("#other-table").bootstrapTable();
{% endblock %}

View File

@ -29,9 +29,4 @@
<li {% if tab == 'so' %} class='active'{% endif %}>
<a href="{% url 'settings-so' %}"><span class='fas fa-truck'></span> {% trans "Sales Orders" %}</a>
</li>
{% if user.is_staff %}
<li{% ifequal tab 'other' %} class='active'{% endifequal %}>
<a href="{% url 'settings-other' %}"><span class='fas fa-cogs'></span> {% trans "Other" %}</a>
</li>
{% endif %}
</ul>