diff --git a/messkit/commands.py b/messkit/commands.py index 6f72df4..1997b18 100644 --- a/messkit/commands.py +++ b/messkit/commands.py @@ -107,6 +107,7 @@ class Install(commands.Subcommand): # make config files context = { + 'app_package': 'messkit', 'app_title': "Messkit", 'appdir': appdir, 'db_url': dburl, diff --git a/messkit/web/menus.py b/messkit/web/menus.py index 932ecaa..c9ffb82 100644 --- a/messkit/web/menus.py +++ b/messkit/web/menus.py @@ -28,44 +28,45 @@ Web Menus def simple_menus(request): url = request.route_url - # reports_menu = { - # 'title': "Reports", - # 'type': 'menu', - # 'items': [ - # { - # 'title': "New Report", - # 'url': url('report_output.create'), - # 'perm': 'report_output.create', - # }, - # { - # 'title': "Generated Reports", - # 'url': url('report_output'), - # 'perm': 'report_output.list', - # }, - # { - # 'title': "Problem Reports", - # 'url': url('problem_reports'), - # 'perm': 'problem_reports.list', - # }, - # ], - # } + people_menu = { + 'title': "People", + 'type': 'menu', + 'items': [ + { + 'title': "All People", + 'route': 'people', + 'perm': 'people.list', + }, + ], + } - # other_menu = { - # 'title': "Other", - # 'type': 'menu', - # 'items': [ - # { - # 'title': "Generate New Feature", - # 'url': url('generate_feature'), - # 'perm': 'common.generate_feature', - # }, - # { - # 'title': "Generate New Project", - # 'url': url('generate_project'), - # 'perm': 'common.generate_project', - # }, - # ], - # } + reports_menu = { + 'title': "Reports", + 'type': 'menu', + 'items': [ + { + 'title': "New Report", + 'route': 'report_output.create', + 'perm': 'report_output.create', + }, + { + 'title': "Generated Reports", + 'route': 'report_output', + 'perm': 'report_output.list', + }, + { + 'title': "Problem Reports", + 'route': 'problem_reports', + 'perm': 'problem_reports.list', + }, + {'type': 'sep'}, + { + 'title': "Poser Reports", + 'route': 'poser.reports', + 'perm': 'poser.reports.list', + }, + ], + } admin_menu = { 'title': "Admin", @@ -97,11 +98,11 @@ def simple_menus(request): 'url': url('emailprofiles'), 'perm': 'emailprofiles.list', }, - # { - # 'title': "Email Attempts", - # 'url': url('email_attempts'), - # 'perm': 'email_attempts.list', - # }, + { + 'title': "Email Attempts", + 'url': url('email_attempts'), + 'perm': 'email_attempts.list', + }, { 'title': "Raw Settings", 'url': url('settings'), @@ -132,8 +133,8 @@ def simple_menus(request): } menus = [ - # reports_menu, - # other_menu, + people_menu, + reports_menu, admin_menu, ] diff --git a/messkit/web/views/__init__.py b/messkit/web/views/__init__.py index b3c55d6..3d0fe1a 100644 --- a/messkit/web/views/__init__.py +++ b/messkit/web/views/__init__.py @@ -28,7 +28,7 @@ Messkit web views def includeme(config): # core - config.include('messkit.web.views.common') + config.include('tailbone.views.common') config.include('tailbone.views.auth') config.include('tailbone.views.menus') # config.include('tailbone.views.importing') diff --git a/messkit/web/views/common.py b/messkit/web/views/common.py deleted file mode 100644 index a2b2664..0000000 --- a/messkit/web/views/common.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8; -*- -###################################################################### -# -# Messkit -- Generic-ish Data Utility App -# Copyright © 2022 Lance Edgar -# -# This file is part of Messkit. -# -# Messkit 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. -# -# Messkit 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 Messkit. If not, see . -# -###################################################################### -""" -Common views -""" - -from tailbone.views import common as base - -import messkit - - -class CommonView(base.CommonView): - - project_title = "Messkit" - project_version = messkit.__version__ + '+dev' - - -def includeme(config): - CommonView.defaults(config)