Class: ODDB::View::Admin::RegistrationComposite

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

Direct Known Subclasses

RootRegistrationComposite

Constant Summary

COMPONENTS =
{
  [0,1]   => View::Admin::RegistrationInnerComposite,
  [0,2]   => :registration_sequences,
}
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'th',
}
DEFAULT_CLASS =
HtmlGrid::Value
SEQUENCES =
View::Admin::RegistrationSequences

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) registration_sequences(model, session)



391
392
393
394
395
396
# File 'src/view/admin/registration.rb', line 391

def registration_sequences(model, session)
  if(sequences = model.sequences)
    values = PointerArray.new(sequences.values, model.pointer)
    self::class::SEQUENCES.new(values, session, self)
  end
end

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



397
398
399
400
401
# File 'src/view/admin/registration.rb', line 397

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