mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 20:22:53 -06:00
Tweak user preference name
This commit is contained in:
parent
626e42145a
commit
aa81d67d6e
@ -54,14 +54,13 @@ PREFERENCES = {
|
|||||||
default='bottom',
|
default='bottom',
|
||||||
description=_('Where the paginator controls will be displayed relative to a table')
|
description=_('Where the paginator controls will be displayed relative to a table')
|
||||||
),
|
),
|
||||||
'ui.table.rows.striped': UserPreference(
|
'ui.tables.striping': UserPreference(
|
||||||
label=_('Striped table rows'),
|
label=_('Striped table rows'),
|
||||||
choices=(
|
choices=(
|
||||||
('', _('Disabled')),
|
('', _('Disabled')),
|
||||||
('true', _('Enabled')),
|
('true', _('Enabled')),
|
||||||
),
|
),
|
||||||
description=_('Show striped effect on table rows'),
|
description=_('Render table rows with alternating colors to increase readability'),
|
||||||
default=False,
|
|
||||||
),
|
),
|
||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
|
@ -163,7 +163,7 @@ class BaseTable(tables.Table):
|
|||||||
columns = userconfig.get(f"tables.{self.name}.columns")
|
columns = userconfig.get(f"tables.{self.name}.columns")
|
||||||
if ordering is None:
|
if ordering is None:
|
||||||
ordering = userconfig.get(f"tables.{self.name}.ordering")
|
ordering = userconfig.get(f"tables.{self.name}.ordering")
|
||||||
if userconfig.get("ui.table.rows.striped"):
|
if userconfig.get("ui.tables.striping"):
|
||||||
self.attrs['class'] += ' table-striped'
|
self.attrs['class'] += ' table-striped'
|
||||||
|
|
||||||
# Fall back to the default columns & ordering
|
# Fall back to the default columns & ordering
|
||||||
|
@ -59,7 +59,7 @@ class UserConfigForm(forms.ModelForm, metaclass=UserConfigFormMetaclass):
|
|||||||
fieldsets = (
|
fieldsets = (
|
||||||
FieldSet(
|
FieldSet(
|
||||||
'locale.language', 'pagination.per_page', 'pagination.placement', 'ui.htmx_navigation',
|
'locale.language', 'pagination.per_page', 'pagination.placement', 'ui.htmx_navigation',
|
||||||
'ui.table.rows.striped',
|
'ui.tables.striping',
|
||||||
name=_('User Interface')
|
name=_('User Interface')
|
||||||
),
|
),
|
||||||
FieldSet('data_format', name=_('Miscellaneous')),
|
FieldSet('data_format', name=_('Miscellaneous')),
|
||||||
|
Loading…
Reference in New Issue
Block a user