diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index da7799397e..c57e82addc 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -39,7 +39,7 @@ from rest_framework.documentation import include_docs_urls from .views import IndexView, SearchView, DatabaseStatsView from .views import SettingsView, EditUserView, SetPasswordView -from .views import ColorThemeSelectView, SettingCategorySelectView +from .views import AppearanceSelectView, SettingCategorySelectView from .views import DynamicJsView from common.views import SettingEdit @@ -79,7 +79,8 @@ apipatterns = [ settings_urls = [ url(r'^user/?', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings-user'), - url(r'^theme/?', ColorThemeSelectView.as_view(), name='settings-theme'), + url(r'^appearance/?', AppearanceSelectView.as_view(), name='settings-appearance'), + url(r'^i18n/?', include('django.conf.urls.i18n')), url(r'^global/?', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'), url(r'^report/?', SettingsView.as_view(template_name='InvenTree/settings/report.html'), name='settings-report'), diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 5a080d7cdc..def4b34781 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -769,12 +769,12 @@ class SettingsView(TemplateView): return ctx -class ColorThemeSelectView(FormView): +class AppearanceSelectView(FormView): """ View for selecting a color theme """ form_class = ColorThemeSelectForm - success_url = reverse_lazy('settings-theme') - template_name = "InvenTree/settings/theme.html" + success_url = reverse_lazy('settings-appearance') + template_name = "InvenTree/settings/appearance.html" def get_user_theme(self): """ Get current user color theme """ @@ -788,7 +788,7 @@ class ColorThemeSelectView(FormView): def get_initial(self): """ Select current user color theme as initial choice """ - initial = super(ColorThemeSelectView, self).get_initial() + initial = super(AppearanceSelectView, self).get_initial() user_theme = self.get_user_theme() if user_theme: diff --git a/InvenTree/templates/InvenTree/settings/appearance.html b/InvenTree/templates/InvenTree/settings/appearance.html new file mode 100644 index 0000000000..8cd7a8d2db --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/appearance.html @@ -0,0 +1,67 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} +{% load inventree_extras %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='theme' %} +{% endblock %} + +{% block subtitle %} +{% trans "Theme Settings" %} +{% endblock %} + +{% block settings %} + +