Auto-register all config pages, for dropdown in App Settings
This commit is contained in:
parent
6f62f141d2
commit
ca57bd3572
4 changed files with 21 additions and 19 deletions
|
@ -4281,6 +4281,8 @@ class MasterView(View):
|
|||
config.add_view(cls, attr='configure',
|
||||
route_name='{}.configure'.format(route_prefix),
|
||||
permission='{}.configure'.format(permission_prefix))
|
||||
config.add_tailbone_config_page('{}.configure'.format(route_prefix),
|
||||
config_title)
|
||||
|
||||
# quickie (search)
|
||||
if cls.supports_quickie_search:
|
||||
|
|
|
@ -125,23 +125,9 @@ class AppSettingsView(View):
|
|||
if not current_group:
|
||||
current_group = self.request.session.get('appsettings.current_group')
|
||||
|
||||
# TODO: this should come from somewhere else
|
||||
possible_config_options = [
|
||||
{'label': "DataSync",
|
||||
'route': 'datasync.configure'},
|
||||
{'label': "Email",
|
||||
'route': 'emailprofiles.configure'},
|
||||
{'label': "Importing / Exporting",
|
||||
'route': 'importing.configure'},
|
||||
{'label': "Products",
|
||||
'route': 'products.configure'},
|
||||
{'label': "Receiving",
|
||||
'route': 'receiving.configure'},
|
||||
{'label': "Reporting",
|
||||
'route': 'report_output.configure'},
|
||||
{'label': "Vendors",
|
||||
'route': 'vendors.configure'},
|
||||
]
|
||||
possible_config_options = sorted(
|
||||
self.request.registry.settings['tailbone_config_pages'],
|
||||
key=lambda p: p['label'])
|
||||
|
||||
config_options = []
|
||||
for option in possible_config_options:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue