diff --git a/theo/config.py b/theo/config.py index ceb7161..59f84a6 100644 --- a/theo/config.py +++ b/theo/config.py @@ -38,9 +38,6 @@ class TheoConfig(ConfigExtension): # call the app "Theo" by default config.setdefault('rattail', 'app_title', "Theo") - # Theo comes with its own menu for web app - config.setdefault('tailbone.menus', 'handler', 'theo.web.menus:TheoMenuHandler') - # Trainwreck model is same regardless of POS config.setdefault('rattail.trainwreck', 'model', 'rattail.trainwreck.db.model.defaults') diff --git a/theo/web/menus.py b/theo/web/menus.py deleted file mode 100644 index 780c439..0000000 --- a/theo/web/menus.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8; -*- -################################################################################ -# -# Rattail -- Retail Software Framework -# Copyright © 2010-2023 Lance Edgar -# -# This file is part of Rattail. -# -# Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. -# -# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# Rattail. If not, see . -# -################################################################################ -""" -Web Menus -""" - -from tailbone import menus as base - -from theo.config import integrate_catapult, integrate_corepos, integrate_locsms - - -class TheoMenuHandler(base.MenuHandler): - """ - Theo menu handler - """ - - def make_menus(self, request, **kwargs): - - menus = [ - self.make_custorders_menu(request), - self.make_people_menu(request), - self.make_products_menu(request), - self.make_vendors_menu(request), - ] - - # TODO: pretty sure this should handle things? - # TODO: ..if so then 100% upstream menu should work here? - # integration_menus = self.make_integration_menus(request) - # if integration_menus: - # menus.extend(integration_menus) - - if integrate_catapult(self.config): - from tailbone_onager.menus import make_catapult_menu - menus.append(make_catapult_menu(request)) - - if integrate_corepos(self.config): - from tailbone_corepos.menus import make_corepos_menu - menus.append(make_corepos_menu(request)) - - if integrate_locsms(self.config): - from tailbone_locsms.menus import make_locsms_menu - menus.append(make_locsms_menu(request)) - - menus.extend([ - self.make_reports_menu(request, include_trainwreck=True), - self.make_admin_menu(request, include_stores=True), - ]) - - return menus diff --git a/theo/web/views/__init__.py b/theo/web/views/__init__.py index 48b8fd8..f4832bf 100644 --- a/theo/web/views/__init__.py +++ b/theo/web/views/__init__.py @@ -30,36 +30,21 @@ from theo.config import integrate_catapult, integrate_corepos, integrate_locsms def includeme(config): rattail_config = config.registry.settings.get('rattail_config') - # core views - config.include('theo.web.views.common') - config.include('tailbone.views.auth') - config.include('tailbone.views.importing') - config.include('tailbone.views.luigi') - config.include('tailbone.views.tables') - config.include('tailbone.views.upgrades') - config.include('tailbone.views.progress') + config.include('tailbone.views.essentials') # main table views config.include('tailbone.views.brands') config.include('tailbone.views.customergroups') config.include('tailbone.views.customers') - config.include('tailbone.views.datasync') config.include('tailbone.views.departments') - config.include('tailbone.views.email') config.include('tailbone.views.employees') config.include('tailbone.views.members') config.include('tailbone.views.messages') - config.include('tailbone.views.people') - config.include('tailbone.views.permissions') config.include('tailbone.views.products') config.include('tailbone.views.reportcodes') - config.include('tailbone.views.reports') - config.include('tailbone.views.roles') - config.include('tailbone.views.settings') config.include('tailbone.views.stores') config.include('tailbone.views.subdepartments') config.include('tailbone.views.taxes') - config.include('tailbone.views.users') config.include('tailbone.views.uoms') config.include('tailbone.views.vendors')