mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
renamed theme to appearance
This commit is contained in:
parent
660f2673ac
commit
c5640fe6c6
@ -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,6 +79,7 @@ apipatterns = [
|
||||
settings_urls = [
|
||||
|
||||
url(r'^user/?', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings-user'),
|
||||
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'),
|
||||
|
@ -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:
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="{% url 'settings-theme' %}" method="post">
|
||||
<form action="{% url 'settings-appearance' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% crispy form %}
|
||||
@ -44,7 +44,6 @@
|
||||
|
||||
<div class="row">
|
||||
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
|
||||
<input name="next" type="hidden" value="">
|
||||
<div class="col-sm-6" style="width: 200px;"><div id="div_id_name" class="form-group"><div class="controls ">
|
||||
<select name="language" class="select form-control">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
@ -6,7 +6,7 @@
|
||||
<a href="{% url 'settings-user' %}"><span class='fas fa-user'></span> {% trans "Account" %}</a>
|
||||
</li>
|
||||
<li{% ifequal tab 'theme' %} class='active'{% endifequal %}>
|
||||
<a href="{% url 'settings-theme' %}"><span class='fas fa-fill'></span> {% trans "Theme" %}</a>
|
||||
<a href="{% url 'settings-appearance' %}"><span class='fas fa-fill'></span> {% trans "Appearance" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% if user.is_staff %}
|
||||
|
Loading…
Reference in New Issue
Block a user