diff --git a/rattail_demo/web/templates/menu.mako b/rattail_demo/web/templates/menu.mako
index b3d0807..e330925 100644
--- a/rattail_demo/web/templates/menu.mako
+++ b/rattail_demo/web/templates/menu.mako
@@ -2,6 +2,26 @@
<%def name="main_menu_items()">
+ % if request.has_any_perm('schedule.view', 'schedule.viewall', 'schedule.edit', 'scheduledshifts.list'):
+
+ Time Clock
+
+ % if request.has_perm('schedule.view'):
+ - ${h.link_to("Personal Schedule", url('schedule.employee'))}
+ % endif
+ % if request.has_perm('schedule.viewall'):
+ - ${h.link_to("Full Schedule", url('schedule'))}
+ % endif
+ % if request.has_perm('schedule.edit'):
+ - ${h.link_to("Edit Schedule", url('schedule.edit'))}
+ % endif
+ % if request.has_perm('scheduledshifts.list'):
+ - ${h.link_to("Raw Scheduled Shifts", url('scheduledshifts'))}
+ % endif
+
+
+ % endif
+
% if request.has_any_perm('products.list', 'vendors.list', 'brands.list', 'families.list', 'reportcodes.list'):
Products
diff --git a/rattail_demo/web/views/__init__.py b/rattail_demo/web/views/__init__.py
index 1819d94..b4c2f3d 100644
--- a/rattail_demo/web/views/__init__.py
+++ b/rattail_demo/web/views/__init__.py
@@ -34,7 +34,7 @@ def includeme(config):
config.include('tailbone.views.customers')
config.include('tailbone.views.departments')
config.include('rattail_demo.web.views.email')
- config.include('tailbone.views.employees')
+ config.include('rattail_demo.web.views.employees')
config.include('tailbone.views.families')
config.include('tailbone.views.messages')
config.include('rattail_demo.web.views.people')
@@ -42,6 +42,7 @@ def includeme(config):
config.include('tailbone.views.reportcodes')
config.include('tailbone.views.roles')
config.include('rattail_demo.web.views.settings')
+ config.include('tailbone.views.shifts')
config.include('tailbone.views.stores')
config.include('tailbone.views.subdepartments')
config.include('rattail_demo.web.views.tempmon')
diff --git a/rattail_demo/web/views/employees.py b/rattail_demo/web/views/employees.py
new file mode 100644
index 0000000..5fc99ae
--- /dev/null
+++ b/rattail_demo/web/views/employees.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+"""
+Employee views
+"""
+
+from __future__ import unicode_literals, absolute_import
+
+from tailbone.views import employees as base
+
+
+class EmployeesView(base.EmployeesView):
+ """
+ Prevent edit/delete for Chuck Norris
+ """
+
+ def editable_instance(self, employee):
+ return employee.person_uuid != '30d1fe06bcf411e6a7c23ca9f40bc550'
+
+ def deletable_instance(self, employee):
+ return employee.person_uuid != '30d1fe06bcf411e6a7c23ca9f40bc550'
+
+
+def includeme(config):
+
+ # autocomplete
+ config.add_route('employees.autocomplete', '/employees/autocomplete')
+ config.add_view(base.EmployeesAutocomplete, route_name='employees.autocomplete',
+ renderer='json', permission='employees.list')
+
+ EmployeesView.defaults(config)