Module: ODDB::View::Admin::SequencePackageList

Includes:
DataFormat, PartSize
Included in:
RootSequencePackages, SequencePackages
Defined in:
src/view/admin/sequence.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :ikscd,
  [1,0] =>  :size,
  [2,0] =>  :price_exfactory,
  [3,0] =>  :price_public,
  [4,0] =>  :ikscat,
  [5,0] =>  :sl_entry,
  [6,0] =>  :out_of_trade,
}
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0]   => 'list',
  [1,0,6] =>  'list right',
}
CSS_HEAD_MAP =
{
  [0,0] =>  'subheading',
}
DEFAULT_CLASS =
HtmlGrid::Value
DEFAULT_HEAD_CLASS =
'subheading right'
EVENT =
:new_package
SORT_DEFAULT =
:ikscd
SORT_HEADER =
false
SYMBOL_MAP =
{
  :ikscd        =>  View::PointerLink,
  :out_of_trade =>  HtmlGrid::BooleanValue,
}

Instance Method Summary (collapse)

Methods included from PartSize

#comparable_size, #part_size

Methods included from DataFormat

#breakline, #company_name, #most_precise_dose, #name_base, #price, #price_exfactory, #price_public

Methods included from ExternalLinks

#contact_link, #data_declaration, #external_link, #faq_link, #generic_definition, #help_link, #legal_note, #meddrugs_update, #wiki_link

Instance Method Details

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



250
251
252
253
254
255
256
257
258
259
260
261
# File 'src/view/admin/sequence.rb', line 250

def ikscd(model, session=@session)
  if(@session.allowed?('edit', 'org.oddb.drugs'))
    PointerLink.new(:ikscd, model, @session, self)
  else
    evt = @session.state.respond_to?(:suggest_choose) ? :suggest_choose : :show
    link = HtmlGrid::Link.new(:ikscd, model, @session, self)
    link.value = model.ikscd
    args = {:pointer => model.pointer}
    link.href = @lookandfeel.event_url(evt, args)
    link
  end
end

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



262
263
264
# File 'src/view/admin/sequence.rb', line 262

def size(model, session=@session)
  comparable_size model
end

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



265
266
267
# File 'src/view/admin/sequence.rb', line 265

def sl_entry(model, session=@session)
  @lookandfeel.lookup(:sl) unless model.sl_entry.nil?
end