#NEWLINE# def hrm( self ) : #NEWLINE# #INDENT# ' Staff ' #NEWLINE# s3 = current . session . s3 #NEWLINE# ADMIN = s3 . system_roles . ADMIN #NEWLINE# manager_mode = ( lambda i : ( s3 . hrm . mode is None ) ) #NEWLINE# personal_mode = ( lambda i : ( s3 . hrm . mode is not None ) ) #NEWLINE# is_org_admin = ( lambda i : ( ( s3 . hrm . orgs and True ) or ( ADMIN in s3 . roles ) ) ) #NEWLINE# settings = current . deployment_settings #NEWLINE# teams = settings . get_hrm_teams ( ) #NEWLINE# use_teams = ( lambda i : teams ) #NEWLINE# vol_enabled = ( lambda i : settings . has_module ( 'vol' ) ) #NEWLINE# return M ( c = 'hrm' ) ( M ( settings . get_hrm_staff_label ( ) , f = 'staff' , m = 'summary' , check = manager_mode ) ( M ( 'Create' , m = 'create' ) , M ( 'Search by Skills' , f = 'competency' ) , M ( 'Import' , f = 'person' , m = 'import' , vars = { #NEWLINE# #INDENT# 'group' : 'staff' , #NEWLINE# #UNINDENT# } , p = 'create' ) ) , M ( 'Staff & Volunteers (Combined)' , c = 'hrm' , f = 'human_resource' , m = 'summary' , check = [ manager_mode , vol_enabled ] ) , M ( teams , f = 'group' , check = [ manager_mode , use_teams ] ) ( M ( 'Create' , m = 'create' ) , M ( 'Search Members' , f = 'group_membership' ) , M ( 'Import' , f = 'group_membership' , m = 'import' ) ) , M ( 'Department Catalog' , f = 'department' , check = manager_mode ) ( M ( 'Create' , m = 'create' ) ) , M ( 'Job Title Catalog' , f = 'job_title' , check = manager_mode ) ( M ( 'Create' , m = 'create' ) ) , M ( 'Skill Catalog' , f = 'skill' , check = manager_mode ) ( M ( 'Create' , m = 'create' ) ) , M ( 'Reports' , f = 'staff' , m = 'report' , check = manager_mode ) ( M ( 'Staff Report' , m = 'report' ) ) , M ( 'Personal Profile' , f = 'person' , check = personal_mode , vars = dict ( access = 'personal' ) ) , M ( 'Staff Management' , f = 'index' , check = [ personal_mode , is_org_admin ] ) , M ( 'Personal Profile' , f = 'person' , check = manager_mode , vars = dict ( access = 'personal' ) ) )