Class: ODDB::View::Admin::AssignDeprivedSequenceForm

Inherits:
FormList
  • Object
show all
Includes:
HtmlGrid::ErrorMessage, ODDB::View::AdditionalInformation, RegistrationSequenceList
Defined in:
src/view/admin/assign_deprived_sequence.rb

Direct Known Subclasses

AssignPatinfoForm

Constant Summary

EVENT =
:assign_deprived_sequence
COMPONENTS =
{
  [0,0] =>  :patinfo_pointer,
  [1,0] =>  :iksnr,
  [2,0] =>  :seqnr,
  [3,0] =>  :name_base,
  [4,0] =>  :name_descr,
  [5,0] =>  :dose, 
  [6,0] =>  :galenic_form,
  [7,0] =>  :company_name,
  [8,0] =>  :atc_class,
  [9,0] =>  :patinfo,
}
CSS_MAP =
{
  [0,0]   => 'small list',
  [1,0,9] =>  'list',
}
SORT_DEFAULT =
nil

Constants included from RegistrationSequenceList

COMPONENTS, CSS_CLASS, CSS_MAP, DEFAULT_CLASS, DEFAULT_HEAD_CLASS, EVENT, SORT_DEFAULT, SORT_HEADER, SYMBOL_MAP

Instance Method Summary (collapse)

Methods included from ODDB::View::AdditionalInformation

#_fachinfo, #atc_ddd_link, #atc_description, #comarketing, #complementary_type, #compositions, #ddd_price, #deductible, #fachinfo, #feedback, #google_search, #ikscat, #limitation_link, #limitation_text, #minifi, #narcotic, #notify, #patent, #patinfo, #qty_unit, #square, #twitter_share

Methods included from PartSize

#comparable_size, #part_size

Methods included from Drugs::AtcDddLink

#atc_ddd_link

Methods included from RegistrationSequenceList

#atc_class, #galenic_form, #seqnr

Instance Method Details

- (Object) compose_list(model, offset)



56
57
58
59
60
61
62
63
# File 'src/view/admin/assign_deprived_sequence.rb', line 56

def compose_list(model, offset)
  _compose(model.sequence, offset)
  #compose_components(model.sequence, offset)
  #compose_css(offset)
  offset = resolve_offset(offset, self::class::OFFSET_STEP)
  offset = resolve_offset(offset, self::class::OFFSET_STEP)
  super(model, offset)
end

- (Object) init



52
53
54
55
# File 'src/view/admin/assign_deprived_sequence.rb', line 52

def init
  super
  error_message
end

- (Object) patinfo_pointer(model, session)



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'src/view/admin/assign_deprived_sequence.rb', line 64

def patinfo_pointer(model, session)
  if(model == @model.sequence \
    && @session.allowed?(:patinfo_shadow))
    link = HtmlGrid::Link.new(:shadow, model, session, self)
    link.href  = @lookandfeel.event_url(:shadow)
    link.set_attribute('class', 'small')
    link
  elsif(patinfo = model.pdf_patinfo)
    radio = HtmlGrid::InputRadio.new(:patinfo_pointer, patinfo, session, self)
    radio.value = model.pointer + [:pdf_patinfo]
    radio
  elsif(patinfo = model.patinfo)
    radio = HtmlGrid::InputRadio.new(:patinfo_pointer, patinfo, session, self)
    radio.value = patinfo.pointer
    radio
  end
end