2017-08-13 22:37:38 -05:00
|
|
|
## -*- coding: utf-8; -*-
|
2016-12-07 20:24:11 -06:00
|
|
|
|
|
|
|
<%def name="main_menu_items()">
|
|
|
|
|
2016-12-10 16:04:34 -06:00
|
|
|
% if request.has_any_perm('schedule.view', 'schedule.viewall', 'schedule.edit', 'scheduledshifts.list'):
|
|
|
|
<li>
|
|
|
|
<a>Time Clock</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('schedule.view'):
|
|
|
|
<li>${h.link_to("Personal Schedule", url('schedule.employee'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('schedule.viewall'):
|
|
|
|
<li>${h.link_to("Full Schedule", url('schedule'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('schedule.edit'):
|
|
|
|
<li>${h.link_to("Edit Schedule", url('schedule.edit'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('scheduledshifts.list'):
|
|
|
|
<li>${h.link_to("Raw Scheduled Shifts", url('scheduledshifts'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
2016-12-07 20:24:11 -06:00
|
|
|
% if request.has_any_perm('products.list', 'vendors.list', 'brands.list', 'families.list', 'reportcodes.list'):
|
|
|
|
<li>
|
|
|
|
<a>Products</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('products.list'):
|
|
|
|
<li>${h.link_to("Products", url('products'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('vendors.list'):
|
|
|
|
<li>${h.link_to("Vendors", url('vendors'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('brands.list'):
|
|
|
|
<li>${h.link_to("Brands", url('brands'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('families.list'):
|
|
|
|
<li>${h.link_to("Families", url('families'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('reportcodes.list'):
|
|
|
|
<li>${h.link_to("Report Codes", url('reportcodes'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
|
|
|
% if request.has_any_perm('people.list', 'customers.list', 'employees.list'):
|
|
|
|
<li>
|
|
|
|
<a>People</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('people.list'):
|
|
|
|
<li>${h.link_to("All People", url('people'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('customers.list'):
|
|
|
|
<li>${h.link_to("Customers", url('customers'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('employees.list'):
|
|
|
|
<li>${h.link_to("Employees", url('employees'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
|
|
|
% if request.has_any_perm('stores.list', 'departments.list', 'subdepartments.list'):
|
|
|
|
<li>
|
|
|
|
<a>Company</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('stores.list'):
|
|
|
|
<li>${h.link_to("Stores", url('stores'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('departments.list'):
|
|
|
|
<li>${h.link_to("Departments", url('departments'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('subdepartments.list'):
|
|
|
|
<li>${h.link_to("Subdepartments", url('subdepartments'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
|
|
|
% if request.has_any_perm('batch.handheld.list', 'batch.inventory.list'):
|
|
|
|
<li>
|
|
|
|
<a>Batches</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('batch.handheld.list'):
|
|
|
|
<li>${h.link_to("Handheld", url('batch.handheld'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('batch.inventory.list'):
|
|
|
|
<li>${h.link_to("Inventory", url('batch.inventory'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
2016-12-10 11:24:01 -06:00
|
|
|
% if request.has_any_perm('tempmon.clients.list', 'tempmon.probes.list', 'tempmon.readings.list'):
|
|
|
|
<li>
|
|
|
|
<a>TempMon</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('tempmon.clients.list'):
|
|
|
|
<li>${h.link_to("Clients", url('tempmon.clients'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('tempmon.probes.list'):
|
|
|
|
<li>${h.link_to("Probes", url('tempmon.probes'))}</li>
|
|
|
|
% endif
|
|
|
|
% if request.has_perm('tempmon.readings.list'):
|
|
|
|
<li>${h.link_to("Readings", url('tempmon.readings'))}</li>
|
|
|
|
% endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
2017-08-13 23:12:38 -05:00
|
|
|
% if request.has_any_perm('users.list', 'userevents.list', 'roles.list', 'emailprofiles.list', 'datasync.list', 'settings.list', 'upgrades.list'):
|
2016-12-07 20:24:11 -06:00
|
|
|
<li>
|
|
|
|
<a>Admin</a>
|
|
|
|
<ul>
|
|
|
|
% if request.has_perm('users.list'):
|
|
|
|
<li>${h.link_to("Users", url('users'))}</li>
|
|
|
|
% endif
|
2017-08-13 23:12:38 -05:00
|
|
|
% if request.has_perm('userevents.list'):
|
|
|
|
<li>${h.link_to("User Events", url('userevents'))}</li>
|
|
|
|
% endif
|
2016-12-07 20:24:11 -06:00
|
|
|
% if request.has_perm('roles.list'):
|
|
|
|
<li>${h.link_to("Roles", url('roles'))}</li>
|
|
|
|
% endif
|
2016-12-10 14:16:37 -06:00
|
|
|
% if request.has_perm('emailprofiles.list'):
|
|
|
|
<li>${h.link_to("Email Profiles", url('emailprofiles'))}</li>
|
|
|
|
% endif
|
2016-12-11 21:21:44 -06:00
|
|
|
% if request.has_perm('datasync.list'):
|
|
|
|
<li>${h.link_to("DataSync Changes", url('datasyncchanges'))}</li>
|
|
|
|
% endif
|
2016-12-07 20:24:11 -06:00
|
|
|
% if request.has_perm('settings.list'):
|
|
|
|
<li>${h.link_to("Settings", url('settings'))}</li>
|
|
|
|
% endif
|
2017-08-13 22:37:38 -05:00
|
|
|
% if request.has_perm('upgrades.list'):
|
|
|
|
<li>${h.link_to("Rattail Demo Upgrades", url('upgrades'))}</li>
|
|
|
|
% endif
|
2016-12-07 20:24:11 -06:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% endif
|
|
|
|
|
|
|
|
% if request.user:
|
|
|
|
<li>
|
|
|
|
<a${' class="root-user"' if request.is_root else ''|n}>${request.user}${" ({})".format(inbox_count) if inbox_count else ''}</a>
|
|
|
|
<ul>
|
|
|
|
% if request.is_root:
|
|
|
|
<li class="root-user">${h.link_to("Stop being root", url('stop_root'))}</li>
|
|
|
|
% elif request.is_admin:
|
|
|
|
<li class="root-user">${h.link_to("Become root", url('become_root'))}</li>
|
|
|
|
% endif
|
2016-12-10 15:40:21 -06:00
|
|
|
<li>${h.link_to("Messages{}".format(" ({})".format(inbox_count) if inbox_count else ''), url('messages.inbox'))}</li>
|
2016-12-07 20:24:11 -06:00
|
|
|
<li>${h.link_to("Change Password", url('change_password'))}</li>
|
|
|
|
<li>${h.link_to("Logout", url('logout'))}</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
% else:
|
|
|
|
<li>${h.link_to("Login", url('login'))}</li>
|
|
|
|
% endif
|
|
|
|
|
|
|
|
</%def>
|