Class: ODDB::View::Drugs::CompositionList

Inherits:
HtmlGrid::DivList
  • Object
show all
Includes:
PartSize
Defined in:
src/view/drugs/package.rb

Constant Summary

COMPONENTS =
{ [0,0] => :composition }
LABELS =
false
OFFSET_STEP =
[1,0]
OMIT_HEADER =
true

Instance Method Summary (collapse)

Methods included from PartSize

#comparable_size, #part_size

Instance Method Details

- (Object) composition(model)



20
21
22
23
24
25
26
27
28
29
# File 'src/view/drugs/package.rb', line 20

def composition(model)
  div = HtmlGrid::Div.new(model, @session, self)
  div.css_class = 'galenic-form'
  size = part_size(model)
  if (comp = model.composition) && (label = comp.label)
    size = "#{label}) #{size}"
  end
  div.value = size
  [ div, View::Admin::ActiveAgents.new(model.active_agents, @session, self)]
end