Module: ODDB::View::Companies::CompanyList

Includes:
UmlautSort
Included in:
UnknownCompanyList
Defined in:
src/view/companies/companylist.rb,
test/test_view/companies/companylist.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :name,
  [1,0] =>  :business_area,
  [2,0] =>  :url,
  [3,0] =>  :contact,
}
DEFAULT_CLASS =
HtmlGrid::Value
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'list',
  [1,0] =>  'list',
  [2,0] =>  'list',
  [3,0] =>  'list',
}
CSS_HEAD_MAP =
{
  [0,0] =>  'th',
  [1,0] =>  'th',
  [2,0] =>  'th',
  [3,0] =>  'th',
}
LOOKANDFEEL_MAP =
{
  :name           => :company_name,
  :business_area  => :company_business_area,
  :url            =>  :company_url,
  :contact        =>  :company_contact,
}
SORT_DEFAULT =
:name
SORT_REVERSE =
false

Constants included from UmlautSort

FILTER_PAIRS

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from UmlautSort

#umlaut_filter

Instance Attribute Details

- (Object) model (readonly)

Returns the value of attribute model



14
15
16
# File 'test/test_view/companies/companylist.rb', line 14

def model
  @model
end

Instance Method Details

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



50
51
52
53
54
# File 'src/view/companies/companylist.rb', line 50

def business_area(model, session=@session)
  if((area = model.business_area) && !area.empty?)
    @lookandfeel.lookup(area)
  end
end

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



69
70
71
# File 'src/view/companies/companylist.rb', line 69

def contact(model, session=@session)
  HtmlGrid::MailLink.new('contact_email', model, @session, self)
end

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



55
56
57
58
59
60
61
62
# File 'src/view/companies/companylist.rb', line 55

def name(model, session=@session)
  link = View::PointerLink.new(:name, model, @session, self)
  if(model.ean13)
    link.set_attribute('title', @lookandfeel.lookup(:ean_code, 
                                                    model.ean13))
  end
  link
end

- (Object) sort_model

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



63
64
65
66
67
68
# File 'src/view/companies/companylist.rb', line 63

def url(model, session=@session)
  link = HtmlGrid::HttpLink.new('url', model, @session, self)
  link.set_attribute('class', 'list')
  link.target = "_self"
  link
end