Avoid the CORE-POS menu if not using buefy theme

b/c jquery theme does not support nested sub-menus
This commit is contained in:
Lance Edgar 2021-12-08 19:15:50 -06:00
parent 22aad5e31f
commit 133c575e9e

View file

@ -189,6 +189,9 @@ def simple_menus(request):
catapult_menu = make_catapult_menu(request) catapult_menu = make_catapult_menu(request)
if include_corepos: if include_corepos:
corepos_menu = None
from tailbone.util import should_use_buefy
if should_use_buefy(request):
from tailbone_corepos.menus import make_corepos_menu from tailbone_corepos.menus import make_corepos_menu
corepos_menu = make_corepos_menu(request) corepos_menu = make_corepos_menu(request)
@ -322,7 +325,7 @@ def simple_menus(request):
if include_catapult: if include_catapult:
menus.append(catapult_menu) menus.append(catapult_menu)
if include_corepos: if include_corepos and corepos_menu:
menus.append(corepos_menu) menus.append(corepos_menu)
if include_locsms: if include_locsms:
menus.append(locsms_menu) menus.append(locsms_menu)