Class: ODDB::View::Admin::AssignFachinfoForm

Inherits:
FormList
  • Object
show all
Includes:
ODDB::View::AdditionalInformation
Defined in:
src/view/admin/assign_fachinfo.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :fachinfo_pointer,
  [1,0] =>  :iksnr,
  [2,0] =>  :name_base,
  [3,0] =>  :company_name,
  [4,0] =>  :fachinfo,
}
CSS_MAP =
{
  [0,0,5] => 'list',
}
CSS_CLASS =
'composite'
DEFAULT_HEAD_CLASS =
'subheading'
LEGACY_INTERFACE =
false
SORT_DEFAULT =
nil
EVENT =
:assign

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

Instance Method Details

- (Object) compose_list(model, offset)



42
43
44
45
46
47
# File 'src/view/admin/assign_fachinfo.rb', line 42

def compose_list(model, offset)
  _compose(model.registration, offset)
  offset = resolve_offset(offset, self::class::OFFSET_STEP)
  offset = resolve_offset(offset, self::class::OFFSET_STEP)
  super(model, offset)
end

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



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'src/view/admin/assign_fachinfo.rb', line 48

def fachinfo_pointer(model, session=@session)
  reg = @model.registration
  if(model == reg || !@session.allowed?('edit', model))
    # nothing
  elsif(model.fachinfo == reg.fachinfo)
    @lookandfeel.lookup(:assign_fachinfo_equal)      
  else
    check = HtmlGrid::InputCheckbox.new("pointers[#{@list_index}]", 
      model, session, self)
    check.value = model.pointer
    check
  end
end