## -*- coding: utf-8 -*-
<%def name="main_menu_items()">
% 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('users.list', 'roles.list', 'settings.list'):
Admin
% if request.has_perm('users.list'):
- ${h.link_to("Users", url('users'))}
% endif
% if request.has_perm('roles.list'):
- ${h.link_to("Roles", url('roles'))}
% endif
% if request.has_perm('settings.list'):
- ${h.link_to("Settings", url('settings'))}
% 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("Change Password", url('change_password'))}
- ${h.link_to("Logout", url('logout'))}
% else:
${h.link_to("Login", url('login'))}
% endif
%def>