Class: ODDB::View::Admin::AssignPatinfoForm

Inherits:
AssignDeprivedSequenceForm show all
Defined in:
src/view/admin/assign_patinfo.rb

Constant Summary

EVENT =
:assign

Constants inherited from AssignDeprivedSequenceForm

COMPONENTS, CSS_MAP, EVENT, SORT_DEFAULT

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 inherited from AssignDeprivedSequenceForm

#compose_list, #init

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



27
28
29
30
31
32
33
34
35
# File 'src/view/admin/assign_patinfo.rb', line 27

def compose_footer(matrix)
  super
  btn = HtmlGrid::Button.new(:back, @model, @session, self)
  args = {:pointer, @model.sequence.pointer}
  url = @lookandfeel._event_url(:resolve, args)
  script = "location.href='#{url}'"
  btn.set_attribute('onClick', script)
  @grid.add(btn, *matrix)
end

- (Object) patinfo_pointer(model, session)



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'src/view/admin/assign_patinfo.rb', line 13

def patinfo_pointer(model, session)
  seq = @model.sequence
  test = seq.pdf_patinfo || seq.patinfo
  if(model == seq || !@session.allowed?('edit', model))
    # nothing
  elsif([model.pdf_patinfo, model.patinfo].include?(test))
    @lookandfeel.lookup(:assign_patinfo_equal)     
  else
    check = HtmlGrid::InputCheckbox.new("pointers[#{@list_index}]", 
                                        model, session, self)
                                        check.value = model.pointer
                                        check
  end
end