Class: ODDB::View::Companies::RootCompany

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

Constant Summary

SNAPBACK_EVENT =
:home_companies

Constants inherited from PrivateTemplate

SEARCH_HEAD

Constants included from Snapback

SNAPBACK_EVENT

Constants inherited from PublicTemplate

COMPONENTS, CONTENT, CSS_CLASS, DOJO_DEBUG, DOJO_ENCODING, DOJO_PARSE_WIDGETS, DOJO_PREFIX, DOJO_REQUIRE, FOOT, HEAD, HTTP_HEADERS, META_TAGS

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from PrivateTemplate

#backtracking, #init, #reorganize_components

Methods included from Snapback

#snapback

Methods inherited from PublicTemplate

#css_link, #dynamic_html_headers, #foot, #head, #init, #javascripts, #title, #title_part_three, #topfoot

Methods included from ODDB::View::Custom::HeadMethods

#just_medical, #oekk_head

Class Method Details

+ (Object) select_company_content(company)



578
579
580
581
582
583
584
585
# File 'src/view/companies/company.rb', line 578

def RootCompany.select_company_content(company)
  case company.business_area
  when 'ba_pharma'
    RootPharmaCompanyComposite
  else 
    RootOtherCompanyComposite
  end
end

Instance Method Details

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



586
587
588
589
# File 'src/view/companies/company.rb', line 586

def content(model, session=@session)
  klass = RootCompany.select_company_content(model)
  klass.new(model, @session, self)
end

- (Object) other_html_headers(context)



590
591
592
593
594
595
596
597
598
599
600
601
# File 'src/view/companies/company.rb', line 590

def other_html_headers(context)
  res = super
  ['company'].each { |name|
    properties = {
      "language"  => "JavaScript",
      "type"      => "text/javascript",
      "src"       => @lookandfeel.resource_global(:javascript, "#{name}.js"),
    }
    res << context.script(properties)
  }
  res
end