mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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 IndexView, SearchView, DatabaseStatsView
|
||||||
from .views import SettingsView, EditUserView, SetPasswordView
|
from .views import SettingsView, EditUserView, SetPasswordView
|
||||||
from .views import ColorThemeSelectView, SettingCategorySelectView
|
from .views import AppearanceSelectView, SettingCategorySelectView
|
||||||
from .views import DynamicJsView
|
from .views import DynamicJsView
|
||||||
|
|
||||||
from common.views import SettingEdit
|
from common.views import SettingEdit
|
||||||
@ -79,6 +79,7 @@ apipatterns = [
|
|||||||
settings_urls = [
|
settings_urls = [
|
||||||
|
|
||||||
url(r'^user/?', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings-user'),
|
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'^i18n/?', include('django.conf.urls.i18n')),
|
||||||
|
|
||||||
url(r'^global/?', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'),
|
url(r'^global/?', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'),
|
||||||
|
@ -769,12 +769,12 @@ class SettingsView(TemplateView):
|
|||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
|
||||||
class ColorThemeSelectView(FormView):
|
class AppearanceSelectView(FormView):
|
||||||
""" View for selecting a color theme """
|
""" View for selecting a color theme """
|
||||||
|
|
||||||
form_class = ColorThemeSelectForm
|
form_class = ColorThemeSelectForm
|
||||||
success_url = reverse_lazy('settings-theme')
|
success_url = reverse_lazy('settings-appearance')
|
||||||
template_name = "InvenTree/settings/theme.html"
|
template_name = "InvenTree/settings/appearance.html"
|
||||||
|
|
||||||
def get_user_theme(self):
|
def get_user_theme(self):
|
||||||
""" Get current user color theme """
|
""" Get current user color theme """
|
||||||
@ -788,7 +788,7 @@ class ColorThemeSelectView(FormView):
|
|||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
""" Select current user color theme as initial choice """
|
""" 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()
|
user_theme = self.get_user_theme()
|
||||||
if user_theme:
|
if user_theme:
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="{% url 'settings-theme' %}" method="post">
|
<form action="{% url 'settings-appearance' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% load crispy_forms_tags %}
|
{% load crispy_forms_tags %}
|
||||||
{% crispy form %}
|
{% crispy form %}
|
||||||
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
|
<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 ">
|
<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">
|
<select name="language" class="select form-control">
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
@ -6,7 +6,7 @@
|
|||||||
<a href="{% url 'settings-user' %}"><span class='fas fa-user'></span> {% trans "Account" %}</a>
|
<a href="{% url 'settings-user' %}"><span class='fas fa-user'></span> {% trans "Account" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li{% ifequal tab 'theme' %} class='active'{% endifequal %}>
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user