Class: ODDB::View::Drugs::RootFachinfoComposite

Inherits:
FachinfoComposite show all
Defined in:
src/view/drugs/fachinfo.rb

Constant Summary

CHOOSER_CLASS =
EditFiChapterChooser

Constants inherited from FachinfoComposite

CHOOSER_CLASS, COLSPAN_MAP, COMPONENTS, CSS_MAP

Constants inherited from FachinfoPreviewComposite

COLSPAN_MAP, COMPONENTS, CSS_CLASS, CSS_MAP, DEFAULT_CLASS

Instance Method Summary (collapse)

Methods inherited from FachinfoComposite

#chapter_chooser, #document, #fachinfo_name

Methods inherited from FachinfoPreviewComposite

#fachinfo_name

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) chapter_view(chapter, document)



269
270
271
272
273
274
275
276
277
# File 'src/view/drugs/fachinfo.rb', line 269

def chapter_view(chapter, document)
  if(@model.company.invoiceable?)
    View::EditChapterForm.new(chapter, document, @session, self)
  elsif(@model.pointer.skeleton == [:create])
    # don't show anything
  else
    super
  end
end

- (Object) init



258
259
260
261
262
263
264
265
266
267
268
# File 'src/view/drugs/fachinfo.rb', line 258

def init
  unless(@model.company.invoiceable?)
    components.update({
      [0,2], :invoiceability,
      [0,3], :document,
    })
    css_map.store([0,3], 'list')
    colspan_map.store([0,3], 2)
  end
  super
end

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



278
279
280
# File 'src/view/drugs/fachinfo.rb', line 278

def invoiceability(model, session=@session)
  PointerLink.new(:e_fi_not_invoiceable, model.company, @session, self)
end