Class: ODDB::Html::View::Drugs::Admin::PackageForm

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Includes:
HtmlGrid::FormMethods
Defined in:
lib/oddb/html/view/drugs/admin/package.rb

Constant Summary collapse

EVENT =
:update
COMPONENTS =
{
  [0,0] => PackageInnerForm,
  [0,1] => :parts,
  [0,2] => :parts_form
}
CSS_MAP =
{ 1 => 'divider' }

Instance Method Summary collapse

Instance Method Details

#parts(model) ⇒ Object



202
203
204
205
# File 'lib/oddb/html/view/drugs/admin/package.rb', line 202

def parts(model)
  key = model.parts.size > 1 ? :parts : :package_and_substances
  @lookandfeel.lookup(key)
end

#parts_form(model) ⇒ Object



206
207
208
# File 'lib/oddb/html/view/drugs/admin/package.rb', line 206

def parts_form(model)
  Parts.new(model.parts, @session, self)
end