<s> from gluon import current <EOL> from s3 import * <EOL> from s3layouts import * <EOL> try : <EOL> from . layouts import * <EOL> except ImportError : <EOL> pass <EOL> import s3menus as default <EOL> class S3MainMenu ( default . S3MainMenu ) : <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def menu ( cls ) : <EOL> """<STR_LIT>""" <EOL> main_menu = MM ( ) ( <EOL> cls . menu_modules ( ) , <EOL> ) <EOL> current . menu . personal = cls . menu_personal ( ) <EOL> current . menu . dashboard = cls . menu_dashboard ( ) <EOL> current . menu . org = cls . menu_org ( ) <EOL> return main_menu <EOL> @ classmethod <EOL> def menu_modules ( cls ) : <EOL> """<STR_LIT>""" <EOL> T = current . T <EOL> return [ <EOL> homepage ( "<STR_LIT>" ) ( <EOL> ) , <EOL> homepage ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , name = T ( "<STR_LIT>" ) ) ( <EOL> ) , <EOL> homepage ( "<STR_LIT>" , name = "<STR_LIT>" ) ( <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" ) , <EOL> ) , <EOL> homepage ( "<STR_LIT>" , name = "<STR_LIT>" ) ( <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> homepage ( "<STR_LIT>" ) ( <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> homepage ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , name = T ( "<STR_LIT>" ) , <EOL> vars = dict ( group = "<STR_LIT>" ) ) ( <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> MM ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> ] <EOL> @ classmethod <EOL> def menu_dashboard ( cls ) : <EOL> """<STR_LIT>""" <EOL> DB = S3DashBoardMenuLayout <EOL> request = current . request <EOL> controller = request . controller <EOL> if controller == "<STR_LIT>" : <EOL> dashboard = DB ( ) ( <EOL> DB ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> DB ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) <EOL> ) ) <EOL> elif controller in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> dashboard = DB ( ) ( <EOL> DB ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> DB ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> ) , <EOL> ) , <EOL> DB ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , f = "<STR_LIT>" ) <EOL> ) ) <EOL> elif controller == "<STR_LIT:default>" and request . function == "<STR_LIT:index>" : <EOL> dashboard = DB ( _id = "<STR_LIT>" ) ( <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> DB ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> image = "<STR_LIT>" , <EOL> title = "<STR_LIT>" , <EOL> text = "<STR_LIT>" ) , <EOL> ) <EOL> else : <EOL> dashboard = None <EOL> return dashboard <EOL> @ classmethod <EOL> def menu_org ( cls ) : <EOL> """<STR_LIT>""" <EOL> OM = S3OrgMenuLayout <EOL> return OM ( ) <EOL> @ classmethod <EOL> def menu_personal ( cls ) : <EOL> """<STR_LIT>""" <EOL> auth = current . auth <EOL> s3 = current . response . s3 <EOL> settings = current . deployment_settings <EOL> menu_lang = ML ( "<STR_LIT>" , right = True ) <EOL> for language in s3 . l10n_languages . items ( ) : <EOL> code , name = language <EOL> menu_lang ( <EOL> ML ( name , translate = False , lang_code = code , lang_name = name ) <EOL> ) <EOL> if not auth . is_logged_in ( ) : <EOL> request = current . request <EOL> login_next = URL ( args = request . args , vars = request . vars ) <EOL> if request . controller == "<STR_LIT:default>" and request . function == "<STR_LIT:user>" and "<STR_LIT>" in request . get_vars : <EOL> login_next = request . get_vars [ "<STR_LIT>" ] <EOL> self_registration = settings . get_security_registration_visible ( ) <EOL> menu_personal = MP ( ) ( <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:user>" , <EOL> m = "<STR_LIT>" , check = self_registration ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:user>" , <EOL> m = "<STR_LIT>" , vars = dict ( _next = login_next ) ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:user>" , <EOL> m = "<STR_LIT>" ) , <EOL> menu_lang <EOL> ) <EOL> else : <EOL> s3_has_role = auth . s3_has_role <EOL> is_org_admin = lambda i : s3_has_role ( "<STR_LIT>" ) and not s3_has_role ( "<STR_LIT>" ) <EOL> menu_personal = MP ( ) ( <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> check = s3_has_role ( "<STR_LIT>" ) ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:user>" , <EOL> check = is_org_admin ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT>" ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:index>" , args = [ "<STR_LIT>" ] ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:user>" , <EOL> m = "<STR_LIT>" ) , <EOL> MP ( "<STR_LIT>" , c = "<STR_LIT:default>" , f = "<STR_LIT:user>" , <EOL> m = "<STR_LIT>" ) , <EOL> menu_lang , <EOL> ) <EOL> return menu_personal <EOL> class S3OptionsMenu ( default . S3OptionsMenu ) : <EOL> """<STR_LIT>""" <EOL> def admin ( self ) : <EOL> """<STR_LIT>""" <EOL> menu = super ( S3OptionsMenu , self ) . admin ( ) <EOL> gis_item = M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) <EOL> menu . append ( gis_item ) <EOL> return menu <EOL> @ staticmethod <EOL> def asset ( ) : <EOL> """<STR_LIT>""" <EOL> ADMIN = current . session . s3 . system_roles . ADMIN <EOL> return M ( c = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> ) <EOL> def doc ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . event ( ) <EOL> @ staticmethod <EOL> def event ( ) : <EOL> """<STR_LIT>""" <EOL> return M ( ) ( <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , args = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = current . auth . s3_has_role ( current . session . s3 . system_roles . ADMIN ) ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> ) <EOL> def gis ( self ) : <EOL> """<STR_LIT>""" <EOL> if current . request . function == "<STR_LIT:index>" : <EOL> return None <EOL> else : <EOL> return super ( S3OptionsMenu , self ) . gis ( ) <EOL> @ staticmethod <EOL> def hrm ( ) : <EOL> """<STR_LIT>""" <EOL> session = current . session <EOL> s3 = current . session . s3 <EOL> ADMIN = s3 . system_roles . ADMIN <EOL> if "<STR_LIT>" not in s3 : <EOL> current . s3db . hrm_vars ( ) <EOL> hrm_vars = s3 . hrm <EOL> SECTORS = "<STR_LIT>" if current . deployment_settings . get_ui_label_cluster ( ) else "<STR_LIT>" <EOL> manager_mode = lambda i : hrm_vars . mode is None <EOL> personal_mode = lambda i : hrm_vars . mode is not None <EOL> is_org_admin = lambda i : hrm_vars . orgs and True or ADMIN in s3 . roles <EOL> is_super_editor = lambda i : current . auth . s3_has_role ( "<STR_LIT>" ) or current . auth . s3_has_role ( "<STR_LIT>" ) <EOL> staff = { "<STR_LIT>" : "<STR_LIT>" } <EOL> return M ( ) ( <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = ( "<STR_LIT>" , "<STR_LIT>" ) , m = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> vars = staff , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> check = [ manager_mode , is_super_editor ] ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , <EOL> f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , <EOL> ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" , check = is_org_admin ) <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" , check = is_org_admin ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , <EOL> vars = dict ( expiring = "<STR_LIT:1>" ) ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" , check = is_org_admin ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" , check = is_org_admin ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> check = [ personal_mode , is_org_admin ] ) , <EOL> ) <EOL> @ staticmethod <EOL> def inv ( ) : <EOL> """<STR_LIT>""" <EOL> ADMIN = current . session . s3 . system_roles . ADMIN <EOL> s3db = current . s3db <EOL> s3db . inv_recv_crud_strings ( ) <EOL> inv_recv_list = current . response . s3 . crud_strings . inv_recv . title_list <EOL> return M ( ) ( <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( inv_recv_list , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" , <EOL> restrict = [ ADMIN ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> ) , <EOL> ) <EOL> def org ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . hrm ( ) <EOL> def req ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . inv ( ) <EOL> def survey ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . event ( ) <EOL> ADMIN = current . session . s3 . system_roles . ADMIN <EOL> series_id = False <EOL> get_vars = Storage ( ) <EOL> try : <EOL> series_id = int ( current . request . args [ <NUM_LIT:0> ] ) <EOL> except : <EOL> try : <EOL> ( dummy , series_id ) = current . request . get_vars [ "<STR_LIT>" ] . split ( "<STR_LIT:.>" ) <EOL> series_id = int ( series_id ) <EOL> except : <EOL> pass <EOL> if series_id : <EOL> get_vars . viewing = "<STR_LIT>" % series_id <EOL> return M ( c = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , c = "<STR_LIT>" , f = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , restrict = [ ADMIN ] ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> m = "<STR_LIT>" , p = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> m = "<STR_LIT>" , p = "<STR_LIT>" , vars = get_vars , check = series_id ) , <EOL> ) , <EOL> ) <EOL> def vehicle ( self ) : <EOL> return self . asset ( ) <EOL> @ staticmethod <EOL> def vol ( ) : <EOL> """<STR_LIT>""" <EOL> auth = current . auth <EOL> s3 = current . session . s3 <EOL> ADMIN = s3 . system_roles . ADMIN <EOL> manager_mode = lambda i : s3 . hrm . mode is None <EOL> personal_mode = lambda i : s3 . hrm . mode is not None <EOL> is_org_admin = lambda i : s3 . hrm . orgs and True or ADMIN in s3 . roles <EOL> is_super_editor = lambda i : auth . s3_has_role ( "<STR_LIT>" ) or auth . s3_has_role ( "<STR_LIT>" ) <EOL> settings = current . deployment_settings <EOL> show_programmes = lambda i : settings . get_hrm_vol_experience ( ) == "<STR_LIT>" <EOL> show_tasks = lambda i : settings . has_module ( "<STR_LIT>" ) and settings . get_project_mode_task ( ) <EOL> teams = settings . get_hrm_teams ( ) <EOL> use_teams = lambda i : teams <EOL> not_vnrc = lambda i : auth . root_org_name ( ) != "<STR_LIT>" <EOL> skills_menu = lambda i : auth . root_org_name ( ) in ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> check_org_dependent_field = lambda tablename , fieldname : settings . set_org_dependent_field ( tablename , fieldname , <EOL> enable_field = False ) <EOL> return M ( c = "<STR_LIT>" ) ( <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> check = [ manager_mode ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> vars = { "<STR_LIT>" : "<STR_LIT>" } , p = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , <EOL> c = "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> check = [ manager_mode , is_super_editor ] ) , <EOL> M ( teams , f = "<STR_LIT>" , <EOL> check = [ manager_mode , use_teams ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = [ manager_mode , not_vnrc ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" , p = "<STR_LIT>" , check = is_org_admin ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = [ manager_mode , skills_menu ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = [ manager_mode , show_programmes ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = [ manager_mode , is_org_admin ] ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = check_org_dependent_field ( "<STR_LIT>" , <EOL> "<STR_LIT>" ) ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = check_org_dependent_field ( "<STR_LIT>" , <EOL> "<STR_LIT>" ) ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = check_org_dependent_field ( "<STR_LIT>" , <EOL> "<STR_LIT>" ) ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> check = manager_mode ) ( <EOL> M ( "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> vars = Storage ( rows = "<STR_LIT>" , <EOL> cols = "<STR_LIT>" , <EOL> fact = "<STR_LIT>" ) , <EOL> check = show_programmes ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" , <EOL> vars = Storage ( rows = "<STR_LIT>" , <EOL> cols = "<STR_LIT>" , <EOL> fact = "<STR_LIT>" ) , <EOL> check = show_programmes ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , m = "<STR_LIT>" ) , <EOL> ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT>" , <EOL> check = [ personal_mode , show_tasks ] , <EOL> vars = dict ( access = "<STR_LIT>" , <EOL> mine = <NUM_LIT:1> ) ) , <EOL> M ( "<STR_LIT>" , f = "<STR_LIT:index>" , <EOL> check = [ personal_mode , is_org_admin ] ) , <EOL> ) </s>
