base implementation of user setting

This commit is contained in:
Matthias 2021-07-22 23:50:09 +02:00
parent 3f6c7df7a8
commit 5f2bef7ee1
2 changed files with 12 additions and 4 deletions

View File

@ -762,10 +762,10 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
"""
GLOBAL_SETTINGS = {
'PART_ASSEMBLY': {
'name': _('Assembly'),
'description': _('Parts can be assembled from other components by default'),
'default': False,
'HOMEPAGE_PART_STARRED': {
'name': _('Show starred parts'),
'description': _('Show starred parts on the homepage'),
'default': True,
'validator': bool,
},
}

View File

@ -63,5 +63,13 @@
</form>
</div>
<h4>{% trans "User Settings" %}</h4>
<table class='table table-striped table-condensed'>
{% include "InvenTree/settings/header.html" %}
<tbody>
{% include "InvenTree/settings/setting.html" with key="HOMEPAGE_PART_STARRED" user_setting=True %}
</tbody>
</table>
{% endblock %}