Class: ODDB::View::Companies::AjaxCompanyComposite

Inherits:
CompanyComposite show all
Defined in:
src/view/companies/company.rb

Direct Known Subclasses

RootOtherCompanyComposite, RootPharmaCompanyComposite

Constant Summary

CSS_ID =
'company-content'

Constants inherited from CompanyComposite

CSS_CLASS, LEGACY_INTERFACE, SYMBOL_MAP

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from CompanyComposite

#inactive_packages, #inactive_registrations

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Class Method Details

+ (Object) select_company_form(company)



484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'src/view/companies/company.rb', line 484

def AjaxCompanyComposite.select_company_form(company)
  case company.business_area
    #when nil 
    #AjaxUnknownCompanyForm
  when 'ba_pharma'
    AjaxPharmaCompanyForm
  when 'ba_insurance'
    AjaxInsuranceCompanyForm
  when 'ba_info'
    AjaxInfoCompanyForm
  else 
    AjaxOtherCompanyForm
  end
end

Instance Method Details

- (Object) company_form(model, session = @session)



498
499
500
501
# File 'src/view/companies/company.rb', line 498

def company_form(model, session=@session)
  klass = AjaxCompanyComposite.select_company_form(model)
  klass.new(model, @session, self)
end

- (Object) company_users(model, session = @session)



502
503
504
505
506
507
508
# File 'src/view/companies/company.rb', line 502

def company_users(model, session=@session)
  users = @session.user.entities.select { |entity|
    entity.get_preference('association', YUS_DOMAIN) == model.odba_id
  }
  model = View::Admin::Entities.wrap_all(users)
  View::Admin::InnerEntityList.new(model, @session, self)
end