Move "other" menu logic to separate method

so derived projects can override easier
This commit is contained in:
Lance Edgar 2023-05-05 14:21:17 -05:00
parent 966c5adf9f
commit ba88c8bcc0

View file

@ -35,17 +35,7 @@ class CorporalMenuHandler(base.MenuHandler):
reports_menu = self.make_reports_menu(request, include_poser=True)
other_menu = {
'title': "Other",
'type': 'menu',
'items': [
{
'title': "Generate New Project",
'route': 'generated_projects.create',
'perm': 'generated_projects.create',
},
],
}
other_menu = self.make_other_menu(request)
admin_menu = self.make_admin_menu(request, include_stores=False)
@ -58,3 +48,16 @@ class CorporalMenuHandler(base.MenuHandler):
]
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',
},
],
}