Class: ODDB::View::Migel::ProductList

Inherits:
HtmlGrid::List show all
Defined in:
src/view/migel/subgroup.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :migel_code,
  [1,0] =>  :description,
}
CSS_MAP =
{
  [0,0] =>  'top list',
  [1,0] =>  'list',
}
DEFAULT_CLASS =
HtmlGrid::Value
DEFAULT_HEAD_CLASS =
'subheading'
SORT_HEADER =
false
SORT_DEFAULT =
:migel_code
SYMBOL_MAP =
{
  :migel_code =>  PointerLink,
}
LEGACY_INTERFACE =
false
LOOKANDFEEL_MAP =
{
  :migel_code =>  :title_product,
  :description  => :nbsp,
}

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Instance Method Details

- (Object) description(model)



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'src/view/migel/subgroup.rb', line 34

def description(model)
  link = PointerLink.new(:to_s, model, @session, self)
  text = [
    model,
    (model.product_text if(model.respond_to?(:product_text))),
  ].compact.collect { |item| 
    item.send(@session.language) 
  }.join(': ').gsub("\n", ' ')
  if(text.size > 60)
    text = text[0,57] << '...'
  end
  link.value = text
  link
end