Add page/way to configure main menus
just the basics so far, index page routes and separators should be supported but nothing else. also "menus from config" is all or nothing, no way to mix config + code at this point
This commit is contained in:
parent
587a4daf7a
commit
74fecf553e
7 changed files with 883 additions and 25 deletions
|
@ -4209,7 +4209,9 @@ class MasterView(View):
|
|||
if self.request.method == 'POST':
|
||||
if self.request.POST.get('remove_settings'):
|
||||
self.configure_remove_settings()
|
||||
self.request.session.flash("Settings have been removed.")
|
||||
self.request.session.flash("All settings for {} have been "
|
||||
"removed.".format(self.get_config_title()),
|
||||
'warning')
|
||||
return self.redirect(self.request.current_route_url())
|
||||
else:
|
||||
data = self.request.POST
|
||||
|
@ -4517,6 +4519,8 @@ class MasterView(View):
|
|||
config.add_view(cls, attr='index', route_name=route_prefix,
|
||||
permission='{}.list'.format(permission_prefix),
|
||||
**kwargs)
|
||||
config.add_tailbone_index_page(route_prefix, model_title_plural,
|
||||
'{}.list'.format(permission_prefix))
|
||||
|
||||
# download results
|
||||
# this is the "new" more flexible approach, but we only want to
|
||||
|
@ -4572,7 +4576,8 @@ class MasterView(View):
|
|||
route_name='{}.configure'.format(route_prefix),
|
||||
permission='{}.configure'.format(permission_prefix))
|
||||
config.add_tailbone_config_page('{}.configure'.format(route_prefix),
|
||||
config_title)
|
||||
config_title,
|
||||
'{}.configure'.format(permission_prefix))
|
||||
|
||||
# quickie (search)
|
||||
if cls.supports_quickie_search:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue