Class: ODDB::Html::View::Drugs::Ajax::RemoteInfos

Inherits:
HtmlGrid::Composite
  • Object
show all
Defined in:
lib/oddb/html/view/drugs/ajax/remote_infos.rb

Constant Summary collapse

LABELS =
true
LEGACY_INTERFACE =
false
COMPONENTS =
{
  [0,0] => :ch_sl_entry,
  [0,1] => :ch_ikscat,
}
CSS_MAP =
{
  [0,1] => 'top',
}
DEFAULT_CLASS =
HtmlGrid::Value

Instance Method Summary collapse

Instance Method Details

#ch_ikscat(model) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/oddb/html/view/drugs/ajax/remote_infos.rb', line 27

def ch_ikscat(model)
  value = HtmlGrid::Value.new(:ch_ikscat, model, @session, self)
  span = HtmlGrid::Span.new(model, @session, self)
  span.value = code = model.ikscat.to_s
  if(code =~ /[AB]/)
    span.css_class = 'prescription'
  else
    span.css_class = 'otc'
  end
  value.value = [span, ":", @lookandfeel.lookup("ch_ikscat_#{code}")]
  value
end

#ch_sl_entry(model) ⇒ Object



22
23
24
25
26
# File 'lib/oddb/html/view/drugs/ajax/remote_infos.rb', line 22

def ch_sl_entry(model)
  value = HtmlGrid::Value.new(:ch_sl_entry, model, @session, self)
  value.value = @lookandfeel.lookup(model.sl_entry ? :yes : :no)
  value
end