Move "other" menu logic to separate method
so derived projects can override easier
This commit is contained in:
parent
966c5adf9f
commit
ba88c8bcc0
|
@ -35,17 +35,7 @@ class CorporalMenuHandler(base.MenuHandler):
|
||||||
|
|
||||||
reports_menu = self.make_reports_menu(request, include_poser=True)
|
reports_menu = self.make_reports_menu(request, include_poser=True)
|
||||||
|
|
||||||
other_menu = {
|
other_menu = self.make_other_menu(request)
|
||||||
'title': "Other",
|
|
||||||
'type': 'menu',
|
|
||||||
'items': [
|
|
||||||
{
|
|
||||||
'title': "Generate New Project",
|
|
||||||
'route': 'generated_projects.create',
|
|
||||||
'perm': 'generated_projects.create',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
admin_menu = self.make_admin_menu(request, include_stores=False)
|
admin_menu = self.make_admin_menu(request, include_stores=False)
|
||||||
|
|
||||||
|
@ -58,3 +48,16 @@ class CorporalMenuHandler(base.MenuHandler):
|
||||||
]
|
]
|
||||||
|
|
||||||
return menus
|
return menus
|
||||||
|
|
||||||
|
def make_other_menu(self, request, **kwargs):
|
||||||
|
return {
|
||||||
|
'title': "Other",
|
||||||
|
'type': 'menu',
|
||||||
|
'items': [
|
||||||
|
{
|
||||||
|
'title': "Generate New Project",
|
||||||
|
'route': 'generated_projects.create',
|
||||||
|
'perm': 'generated_projects.create',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue