#NEWLINE# def __call__( self ) : #NEWLINE# #INDENT# output = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# T = current . T #NEWLINE# response = current . response #NEWLINE# s3 = response . s3 #NEWLINE# s3 . stylesheets . append ( '../themes/CERT/homepage.css' ) #NEWLINE# settings = current . deployment_settings #NEWLINE# output [ 'title' ] = response . title = settings . get_system_name ( ) #NEWLINE# if settings . has_module ( 'cms' ) : #NEWLINE# #INDENT# system_roles = current . auth . get_system_roles ( ) #NEWLINE# ADMIN = ( system_roles . ADMIN in current . session . s3 . roles ) #NEWLINE# s3db = current . s3db #NEWLINE# table = s3db . cms_post #NEWLINE# ltable = s3db . cms_post_module #NEWLINE# module = 'default' #NEWLINE# resource = 'index' #NEWLINE# query = ( ( ( ( ltable . module == module ) & ( ( ltable . resource == None ) | ( ltable . resource == resource ) ) ) & ( ltable . post_id == table . id ) ) & ( table . deleted != True ) ) #NEWLINE# item = current . db ( query ) . select ( table . body , table . id , limitby = ( 0 , 1 ) ) . first ( ) #NEWLINE# if item : #NEWLINE# #INDENT# if ADMIN : #NEWLINE# #INDENT# item = DIV ( XML ( item . body ) , BR ( ) , A ( T ( 'Edit' ) , _href = URL ( c = 'cms' , f = 'post' , args = [ item . id , 'update' ] ) , _class = 'action-btn' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# item = DIV ( XML ( item . body ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ADMIN : #NEWLINE# #INDENT# if ( s3 . crud . formstyle == 'bootstrap' ) : #NEWLINE# #INDENT# _class = 'btn' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _class = 'action-btn' #NEWLINE# #UNINDENT# item = A ( T ( 'Edit' ) , _href = URL ( c = 'cms' , f = 'post' , args = 'create' , vars = { #NEWLINE# #INDENT# 'module' : module , #NEWLINE# 'resource' : resource , #NEWLINE# #UNINDENT# } ) , _class = ( '%s cms-edit' % _class ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# item = '' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# item = '' #NEWLINE# #UNINDENT# output [ 'item' ] = item #NEWLINE# menus = [ { #NEWLINE# #INDENT# 'title' : T ( 'Volunteers' ) , #NEWLINE# 'icon' : 'user' , #NEWLINE# 'description' : T ( 'Manage people who have volunteered for your organization, their contact details, certicates and trainings.' ) , #NEWLINE# 'module' : 'vol' , #NEWLINE# 'function' : 'volunteer' , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : T ( 'Shelters' ) , #NEWLINE# 'icon' : 'home' , #NEWLINE# 'description' : T ( 'List of Shelters.' ) , #NEWLINE# 'module' : 'cr' , #NEWLINE# 'function' : 'shelter' , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : T ( 'Hospitals' ) , #NEWLINE# 'icon' : 'h-sign' , #NEWLINE# 'description' : T ( 'List of Hospitals.' ) , #NEWLINE# 'module' : 'hms' , #NEWLINE# 'function' : 'hospital' , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : T ( 'Patients' ) , #NEWLINE# 'icon' : 'ambulance' , #NEWLINE# 'description' : T ( 'List of Patients.' ) , #NEWLINE# 'module' : 'patient' , #NEWLINE# 'function' : 'patient' , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : T ( 'Requests' ) , #NEWLINE# 'icon' : 'truck' , #NEWLINE# 'description' : T ( 'Requests for goods or services.' ) , #NEWLINE# 'module' : 'req' , #NEWLINE# 'function' : 'req' , #NEWLINE# 'args' : None , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : T ( 'Resources' ) , #NEWLINE# 'icon' : 'wrench' , #NEWLINE# 'description' : T ( 'Resources that organizations have that are useful for response.' ) , #NEWLINE# 'module' : 'org' , #NEWLINE# 'function' : 'resource' , #NEWLINE# 'args' : None , #NEWLINE# 'buttons' : [ { #NEWLINE# #INDENT# 'args' : 'summary' , #NEWLINE# 'icon' : 'list' , #NEWLINE# 'label' : T ( 'View' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'args' : 'create' , #NEWLINE# 'icon' : 'plus-sign' , #NEWLINE# 'label' : T ( 'Create' ) , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ] #NEWLINE# output [ 'menus' ] = menus #NEWLINE# self . _view ( THEME , 'index.html' ) #NEWLINE# return output