def drk_org_rheader(r, tabs=[]):
 if (r.representation != 'html'):
  return None
 from s3 import s3_rheader_resource, S3ResourceHeader
 (tablename, record) = s3_rheader_resource(r)
 if (tablename != r.tablename):
  resource = current.s3db.resource(tablename, id=record.id)
 else:
  resource = r.resource
 rheader = None
 rheader_fields = []
 if record:
  T = current.T
  if (tablename == 'org_facility'):
   if (not tabs):
    tabs = [(T('Basic Details'), None)]
   rheader_fields = [['name', 'email'], ['organisation_id', 'phone1'], ['location_id', 'phone2']]
  rheader = S3ResourceHeader(rheader_fields, tabs)(r, table=resource.table, record=record)
 return rheader

def drk_org_rheader ( r , tabs = [ ] ) : if ( r . representation != 'html' ) : return None from s3 import s3_rheader_resource , S3ResourceHeader ( tablename , record ) = s3_rheader_resource ( r ) if ( tablename != r . tablename ) : resource = current . s3db . resource ( tablename , id = record . id ) else : resource = r . resource rheader = None rheader_fields = [ ] if record : T = current . T if ( tablename == 'org_facility' ) : if ( not tabs ) : tabs = [ ( T ( 'Basic Details' ) , None ) ] rheader_fields = [ [ 'name' , 'email' ] , [ 'organisation_id' , 'phone1' ] , [ 'location_id' , 'phone2' ] ] rheader = S3ResourceHeader ( rheader_fields , tabs ) ( r , table = resource . table , record = record ) return rheader
org custom resource headers .