From 92c1e3c1a573b13f386f2cae89b8158071a115b6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 19 Oct 2020 23:50:39 +1100 Subject: [PATCH] Update settings pages --- InvenTree/InvenTree/urls.py | 7 ++- .../templates/InvenTree/settings/build.html | 14 +++++ .../InvenTree/settings/currency.html | 9 ++- .../templates/InvenTree/settings/other.html | 7 +++ .../templates/InvenTree/settings/part.html | 5 ++ .../templates/InvenTree/settings/po.html | 13 +++++ .../InvenTree/settings/settings.html | 11 +++- .../templates/InvenTree/settings/so.html | 13 +++++ .../templates/InvenTree/settings/stock.html | 13 +++++ .../templates/InvenTree/settings/tabs.html | 36 +++++++++--- .../templates/InvenTree/settings/theme.html | 6 +- .../templates/InvenTree/settings/user.html | 58 ++++++++++--------- 12 files changed, 149 insertions(+), 43 deletions(-) create mode 100644 InvenTree/templates/InvenTree/settings/build.html create mode 100644 InvenTree/templates/InvenTree/settings/po.html create mode 100644 InvenTree/templates/InvenTree/settings/so.html create mode 100644 InvenTree/templates/InvenTree/settings/stock.html diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index d718871851..bc0316cca0 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -69,9 +69,14 @@ 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'^currency/?', SettingsView.as_view(template_name='InvenTree/settings/currency.html'), name='settings-currency'), url(r'^part/?', SettingsView.as_view(template_name='InvenTree/settings/part.html'), name='settings-part'), - url(r'^theme/?', ColorThemeSelectView.as_view(), name='settings-theme'), + url(r'^stock/?', SettingsView.as_view(template_name='InvenTree/settings/stock.html'), name='settings-stock'), + 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 diff --git a/InvenTree/templates/InvenTree/settings/build.html b/InvenTree/templates/InvenTree/settings/build.html new file mode 100644 index 0000000000..3197d60fa5 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/build.html @@ -0,0 +1,14 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='build' %} +{% endblock %} + +{% block subtitle %} +{% trans "Build Order Settings" %} +{% endblock %} + +{% block settings %} + +{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/currency.html b/InvenTree/templates/InvenTree/settings/currency.html index c585011ecd..99948eeeb1 100644 --- a/InvenTree/templates/InvenTree/settings/currency.html +++ b/InvenTree/templates/InvenTree/settings/currency.html @@ -1,4 +1,9 @@ {% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + +{% block subtitle %} +{% trans "General Settings" %} +{% endblock %} {% block tabs %} {% include "InvenTree/settings/tabs.html" with tab='currency' %} @@ -6,10 +11,10 @@ {% block settings %} -

Currencies

+

{% trans "Currencies" %}

- +
diff --git a/InvenTree/templates/InvenTree/settings/other.html b/InvenTree/templates/InvenTree/settings/other.html index 2f6207b170..c518074fd0 100644 --- a/InvenTree/templates/InvenTree/settings/other.html +++ b/InvenTree/templates/InvenTree/settings/other.html @@ -1,9 +1,16 @@ {% 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 %}

InvenTree Settings

diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 5eba81a72a..7c028ca6d6 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -5,7 +5,12 @@ {% include "InvenTree/settings/tabs.html" with tab='part' %} {% endblock %} +{% block subtitle %} +{% trans "Part Settings" %} +{% endblock %} + {% block settings %} +

{% trans "Part Parameter Templates" %}

diff --git a/InvenTree/templates/InvenTree/settings/po.html b/InvenTree/templates/InvenTree/settings/po.html new file mode 100644 index 0000000000..7d32611404 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/po.html @@ -0,0 +1,13 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='po' %} +{% endblock %} + +{% block subtitle %} +{% trans "Purchase Order Settings" %} +{% endblock %} + +{% block settings %} +{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/settings.html b/InvenTree/templates/InvenTree/settings/settings.html index dab7ec277b..90adfd5fed 100644 --- a/InvenTree/templates/InvenTree/settings/settings.html +++ b/InvenTree/templates/InvenTree/settings/settings.html @@ -1,15 +1,16 @@ {% extends "base.html" %} +{% load i18n %} {% load static %} {% block page_title %} -InvenTree | Settings +InvenTree | {% trans "Settings" %} {% endblock %} {% block content %}
-

InvenTree Settings

+

InvenTree {% trans "Settings" %}


@@ -19,6 +20,12 @@ InvenTree | Settings
+

+ {% block subtitle %} + SUBTITLE GOES HERE + {% endblock %} +

+
{% block settings %} {% endblock %}
diff --git a/InvenTree/templates/InvenTree/settings/so.html b/InvenTree/templates/InvenTree/settings/so.html new file mode 100644 index 0000000000..e66fd85148 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/so.html @@ -0,0 +1,13 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='so' %} +{% endblock %} + +{% block subtitle %} +{% trans "Sales Order Settings" %} +{% endblock %} + +{% block settings %} +{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/stock.html b/InvenTree/templates/InvenTree/settings/stock.html new file mode 100644 index 0000000000..c3c40087ff --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/stock.html @@ -0,0 +1,13 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='stock' %} +{% endblock %} + +{% block subtitle %} +{% trans "Stock Settings" %} +{% endblock %} + +{% block settings %} +{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/tabs.html b/InvenTree/templates/InvenTree/settings/tabs.html index 8719d29c81..67207fde52 100644 --- a/InvenTree/templates/InvenTree/settings/tabs.html +++ b/InvenTree/templates/InvenTree/settings/tabs.html @@ -1,19 +1,37 @@ +{% load i18n %} + +

{% trans "User Settings" %}

+

{% trans "InvenTree Settings" %}

+ \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/theme.html b/InvenTree/templates/InvenTree/settings/theme.html index 90f148b468..413bb67dd3 100644 --- a/InvenTree/templates/InvenTree/settings/theme.html +++ b/InvenTree/templates/InvenTree/settings/theme.html @@ -6,11 +6,15 @@ {% include "InvenTree/settings/tabs.html" with tab='theme' %} {% endblock %} +{% block subtitle %} +{% trans "Theme Settings" %} +{% endblock %} + {% block settings %}
-

Color Themes

+

{% trans "Color Themes" %}

diff --git a/InvenTree/templates/InvenTree/settings/user.html b/InvenTree/templates/InvenTree/settings/user.html index 7dcef2bc90..28ab8746cb 100644 --- a/InvenTree/templates/InvenTree/settings/user.html +++ b/InvenTree/templates/InvenTree/settings/user.html @@ -1,41 +1,43 @@ {% extends "InvenTree/settings/settings.html" %} +{% load i18n %} + {% block tabs %} {% include "InvenTree/settings/tabs.html" with tab='user' %} {% endblock %} +{% block subtitle %} +{% trans "User Settings" %} +{% endblock %} + {% block settings %} -
-
-

User Information

+
+

{% trans "User Information" %}

+
+
Edit
+
Set Password
-
-
-
Edit
-
Set Password
-
-
-
-
- - - - - - - - - - - - - - - - -
Username{{ user.username }}
First Name{{ user.first_name }}
Last Name{{ user.last_name }}
Email Address{{ user.email }}
+ + + + + + + + + + + + + + + + + +
{% trans "Username" %}{{ user.username }}
{% trans "First Name" %}{{ user.first_name }}
{% trans "Last Name" %}{{ user.last_name }}
{% trans "Email Address" %}{{ user.email }}
+ {% endblock %}