diff --git a/rattail_demo/web/menus.py b/rattail_demo/web/menus.py index 48777fa..ecaa89c 100644 --- a/rattail_demo/web/menus.py +++ b/rattail_demo/web/menus.py @@ -215,21 +215,38 @@ def simple_menus(request): 'url': url('roles'), 'perm': 'roles.list', }, + {'type': 'sep'}, + { + 'title': "App Settings", + 'url': url('appsettings'), + 'perm': 'settings.list', + }, { 'title': "Email Settings", 'url': url('emailprofiles'), 'perm': 'emailprofiles.list', }, + { + 'title': "Email Attempts", + 'url': url('email_attempts'), + 'perm': 'email_attempts.list', + }, { 'title': "Raw Settings", 'url': url('settings'), 'perm': 'settings.list', }, + {'type': 'sep'}, { 'title': "DataSync Changes", 'url': url('datasyncchanges'), 'perm': 'datasync.list', }, + { + 'title': "Tables", + 'url': url('tables'), + 'perm': 'tables.list', + }, { 'title': "Rattail Demo Upgrades", 'url': url('upgrades'), diff --git a/rattail_demo/web/templates/menu.mako b/rattail_demo/web/templates/menu.mako index 966e724..1b599a0 100644 --- a/rattail_demo/web/templates/menu.mako +++ b/rattail_demo/web/templates/menu.mako @@ -1,43 +1,10 @@ ## -*- coding: utf-8; -*- - -<%def name="make_simple_menu()"> - - % for topitem in menus: -
  • - ${topitem.title} - -
  • - % endfor - - ## User Menu - % if request.user: -
  • - ${request.user}${" ({})".format(inbox_count) if inbox_count else ''} - -
  • - % else: -
  • ${h.link_to("Login", url('login'))}
  • - % endif - - +<%inherit file="tailbone:templates/menu.mako" /> <%def name="main_menu_items()"> % if request.rattail_config.getbool('tailbone', 'menus.simple', default=False): - ${self.make_simple_menu()} + ${parent.main_menu_items()} % else: % if request.has_any_perm('users.list', 'roles.list', 'settings.list', 'upgrades.list'): diff --git a/rattail_demo/web/views/__init__.py b/rattail_demo/web/views/__init__.py index f32d45f..71f9d83 100644 --- a/rattail_demo/web/views/__init__.py +++ b/rattail_demo/web/views/__init__.py @@ -12,6 +12,7 @@ def includeme(config): config.include('rattail_demo.web.views.common') config.include('rattail_demo.web.views.auth') config.include('tailbone.views.progress') + config.include('tailbone.views.tables') # main table views config.include('tailbone.views.brands') diff --git a/rattail_demo/web/views/email.py b/rattail_demo/web/views/email.py index 4343a5b..03d9a5b 100644 --- a/rattail_demo/web/views/email.py +++ b/rattail_demo/web/views/email.py @@ -29,3 +29,4 @@ class ProfilesView(base.ProfilesView): def includeme(config): ProfilesView.defaults(config) base.EmailPreview.defaults(config) + base.EmailAttemptView.defaults(config) diff --git a/rattail_demo/web/views/settings.py b/rattail_demo/web/views/settings.py index 42bf9b1..b7082a9 100644 --- a/rattail_demo/web/views/settings.py +++ b/rattail_demo/web/views/settings.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- """ Settings views """ @@ -34,4 +34,5 @@ class SettingsView(base.SettingsView): def includeme(config): + base.AppSettingsView.defaults(config) SettingsView.defaults(config)