Class: ODDB::View::Admin::PackageComposite

Inherits:
HtmlGrid::Composite show all
Includes:
SwissmedicSource
Defined in:
src/view/admin/package.rb

Direct Known Subclasses

RootPackageComposite

Constant Summary

COMPONENTS =
{
  [0,0] =>  :package_name,
  [0,1] =>  View::Admin::PackageInnerComposite,
}
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'th',
}

Instance Method Summary (collapse)

Methods included from SwissmedicSource

#format_source, #package_source, #registration_source, #sequence_source

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) package_name(model, session = @session)



301
302
303
304
# File 'src/view/admin/package.rb', line 301

def package_name(model, session=@session)
  sequence = model.parent(session.app)
  [sequence.name, model.size].compact.join(' - ')
end

- (Object) source(model, session = @session)



305
306
307
308
309
# File 'src/view/admin/package.rb', line 305

def source(model, session=@session)
  val = HtmlGrid::Value.new(:source, model, @session, self)
  val.value = package_source(model) if model
  val
end