## -*- coding: utf-8; -*-
<%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
% if request.has_perm('products.list'):
- ${h.link_to("Products", url('products'))}
% endif
% if request.has_perm('vendors.list'):
- ${h.link_to("Vendors", url('vendors'))}
% endif
% if request.has_perm('brands.list'):
- ${h.link_to("Brands", url('brands'))}
% endif
% if request.has_perm('families.list'):
- ${h.link_to("Families", url('families'))}
% endif
% if request.has_perm('reportcodes.list'):
- ${h.link_to("Report Codes", url('reportcodes'))}
% endif
% endif
% if request.has_any_perm('people.list', 'customers.list', 'employees.list'):
People
% if request.has_perm('people.list'):
- ${h.link_to("All People", url('people'))}
% endif
% if request.has_perm('customers.list'):
- ${h.link_to("Customers", url('customers'))}
% endif
% if request.has_perm('employees.list'):
- ${h.link_to("Employees", url('employees'))}
% endif
% endif
% if request.has_any_perm('stores.list', 'departments.list', 'subdepartments.list'):
Company
% if request.has_perm('stores.list'):
- ${h.link_to("Stores", url('stores'))}
% endif
% if request.has_perm('departments.list'):
- ${h.link_to("Departments", url('departments'))}
% endif
% if request.has_perm('subdepartments.list'):
- ${h.link_to("Subdepartments", url('subdepartments'))}
% endif
% endif
% if request.has_any_perm('batch.handheld.list', 'batch.inventory.list'):
Batches
% if request.has_perm('batch.handheld.list'):
- ${h.link_to("Handheld", url('batch.handheld'))}
% endif
% if request.has_perm('batch.inventory.list'):
- ${h.link_to("Inventory", url('batch.inventory'))}
% endif
% endif
% if request.has_any_perm('tempmon.clients.list', 'tempmon.probes.list', 'tempmon.readings.list'):
TempMon
% if request.has_perm('tempmon.clients.list'):
- ${h.link_to("Clients", url('tempmon.clients'))}
% endif
% if request.has_perm('tempmon.probes.list'):
- ${h.link_to("Probes", url('tempmon.probes'))}
% endif
% if request.has_perm('tempmon.readings.list'):
- ${h.link_to("Readings", url('tempmon.readings'))}
% endif
% endif
% if request.has_any_perm('users.list', 'userevents.list', 'roles.list', 'emailprofiles.list', 'datasync.list', 'settings.list', 'upgrades.list'):
Admin
% if request.has_perm('users.list'):
- ${h.link_to("Users", url('users'))}
% endif
% if request.has_perm('userevents.list'):
- ${h.link_to("User Events", url('userevents'))}
% endif
% if request.has_perm('roles.list'):
- ${h.link_to("Roles", url('roles'))}
% endif
% if request.has_perm('emailprofiles.list'):
- ${h.link_to("Email Profiles", url('emailprofiles'))}
% endif
% if request.has_perm('datasync.list'):
- ${h.link_to("DataSync Changes", url('datasyncchanges'))}
% endif
% if request.has_perm('settings.list'):
- ${h.link_to("Settings", url('settings'))}
% endif
% if request.has_perm('upgrades.list'):
- ${h.link_to("Rattail Demo Upgrades", url('upgrades'))}
% endif
% endif
% if request.user:
${request.user}${" ({})".format(inbox_count) if inbox_count else ''}
% if request.is_root:
- ${h.link_to("Stop being root", url('stop_root'))}
% elif request.is_admin:
- ${h.link_to("Become root", url('become_root'))}
% endif
- ${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'))}
- ${h.link_to("Change Password", url('change_password'))}
- ${h.link_to("Logout", url('logout'))}
% else:
${h.link_to("Login", url('login'))}
% endif
%def>