def transport_rheader(r, tabs=[]):
 if (r.representation != 'html'):
  return None
 settings = current.deployment_settings
 s3db = current.s3db
 (tablename, record) = s3_rheader_resource(r)
 table = s3db.table(tablename)
 rheader = None
 rheader_fields = []
 if record:
  T = current.T
  if (tablename == 'transport_border_crossing'):
   if (not tabs):
    tabs = [(T('Details'), None), (T('Control Points'), 'border_control_point')]
   rheader_fields = [['name'], ['location_id']]
  else:
   if (not tabs):
    tabs = [(T('Details'), None)]
   rheader_fields = [['name'], ['location_id']]
   if settings.has_module('req'):
    tabs.extend(s3db.req_tabs(r))
   if settings.has_module('inv'):
    tabs.extend(s3db.inv_tabs(r))
  rheader = S3ResourceHeader(rheader_fields, tabs)(r, table=table, record=record)
 return rheader

def transport_rheader ( r , tabs = [ ] ) : if ( r . representation != 'html' ) : return None settings = current . deployment_settings s3db = current . s3db ( tablename , record ) = s3_rheader_resource ( r ) table = s3db . table ( tablename ) rheader = None rheader_fields = [ ] if record : T = current . T if ( tablename == 'transport_border_crossing' ) : if ( not tabs ) : tabs = [ ( T ( 'Details' ) , None ) , ( T ( 'Control Points' ) , 'border_control_point' ) ] rheader_fields = [ [ 'name' ] , [ 'location_id' ] ] else : if ( not tabs ) : tabs = [ ( T ( 'Details' ) , None ) ] rheader_fields = [ [ 'name' ] , [ 'location_id' ] ] if settings . has_module ( 'req' ) : tabs . extend ( s3db . req_tabs ( r ) ) if settings . has_module ( 'inv' ) : tabs . extend ( s3db . inv_tabs ( r ) ) rheader = S3ResourceHeader ( rheader_fields , tabs ) ( r , table = table , record = record ) return rheader
transport module resource headers .