mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Improves bootstrap compatibility, allowing for dropping in theme CSS. Also improves responsive design but still has a ways to go.
28 lines
737 B
Python
28 lines
737 B
Python
from allianceauth.services.hooks import MenuItemHook, UrlHook
|
|
|
|
from allianceauth import hooks
|
|
from . import urls
|
|
|
|
|
|
class OpTimerboardMenu(MenuItemHook):
|
|
def __init__(self):
|
|
MenuItemHook.__init__(self, 'Fleet Operations',
|
|
'fa fa-exclamation fa-fw',
|
|
'optimer:view',
|
|
navactive=['optimer:'])
|
|
|
|
def render(self, request):
|
|
if request.user.has_perm('auth.optimer_view'):
|
|
return MenuItemHook.render(self, request)
|
|
return ''
|
|
|
|
|
|
@hooks.register('menu_item_hook')
|
|
def register_menu():
|
|
return OpTimerboardMenu()
|
|
|
|
|
|
@hooks.register('url_hook')
|
|
def register_url():
|
|
return UrlHook(urls, 'optimer', r'^optimer/')
|