Class: ODDB::View::Migel::ProductComposite

Inherits:
HtmlGrid::Composite show all
Defined in:
src/view/migel/product.rb

Constant Summary

CSS_CLASS =
'composite'
COMPONENTS =
{
  [0,0] =>  'migel_product',
  [0,1] =>  ProductInnerComposite,
  [0,2] =>  :accessories,
}
CSS_MAP =
{
  [0,0] =>  'th',
  [0,2] =>  'list',
}
DEFAULT_CLASS =
HtmlGrid::Value
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) accessories(model)



120
121
122
123
124
125
126
127
128
# File 'src/view/migel/product.rb', line 120

def accessories(model)
  acc = model.accessories
  prods = model.products
  if(!acc.empty?)
    AccessoryList.new(acc, @session, self)
  elsif(!prods.empty?)
    AccessoryOfList.new(prods, @session, self)
  end
end