Class: ODDB::View::Migel::SubgroupInnerComposite

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

Constant Summary

COMPONENTS =
{
  [0,0] => :migel_code,
  [0,1] => :group,
  [0,2] => :description,
  [0,3] => :limitation_text,
}
CSS_MAP =
{
  [0,0,1,4] => 'list top',
  [1,0,1,4] => 'list',
}
LABELS =
true
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) description(model, key = :descr)



63
64
65
66
67
68
69
# File 'src/view/migel/subgroup.rb', line 63

def description(model, key = :descr)
  value = HtmlGrid::Value.new(key, model, @session, self)
  if(model)
    value.value = model.send(@session.language)
  end
  value
end

- (Object) group(model)



70
71
72
# File 'src/view/migel/subgroup.rb', line 70

def group(model)
  pointer_link(model.group)
end

- (Object) limitation_text(model)



73
74
75
# File 'src/view/migel/subgroup.rb', line 73

def limitation_text(model)
  description(model.limitation_text, :limitation_text)
end


76
77
78
79
80
# File 'src/view/migel/subgroup.rb', line 76

def pointer_link(model)
  link = PointerLink.new(:to_s, model, @session, self)
  link.value = model.send(@session.language)
  link
end