mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 13:30:17 +02:00
Implement url hooks. Many apps are now removable. Default to assuming services have been migrated.
28 lines
731 B
Python
28 lines
731 B
Python
from services.hooks import MenuItemHook, UrlHook
|
|
from alliance_auth import hooks
|
|
from hrapplications import urls
|
|
|
|
|
|
class ApplicationsMenu(MenuItemHook):
|
|
def __init__(self):
|
|
MenuItemHook.__init__(self,
|
|
'Applications',
|
|
'fa fa-file-o fa-fw grayiconecolor',
|
|
'hrapplications:index',
|
|
navactive=['hrapplications:'])
|
|
|
|
|
|
@hooks.register('menu_item_hook')
|
|
def register_menu():
|
|
return ApplicationsMenu()
|
|
|
|
|
|
class ApplicationsUrls(UrlHook):
|
|
def __init__(self):
|
|
UrlHook.__init__(self, urls, 'hrapplications', r'^hr/')
|
|
|
|
|
|
@hooks.register('url_hook')
|
|
def register_url():
|
|
return ApplicationsUrls()
|