Class: ODDB::View::Analysis::List

Inherits:
HtmlGrid::List show all
Includes:
ODDB::View::AdditionalInformation
Defined in:
src/view/analysis/result.rb

Direct Known Subclasses

AlphabeticalList

Constant Summary

COMPONENTS =
{
  [0,0] => :code,
  [1,0] => :lab_areas,
  [2,0] => :list_title,
  [3,0] => :description,
  [4,0] => :taxpoints,
  [5,0] => :analysis_revision,
#   [6,0]  => :feedback,
  [6,0] => :google_search,
#   [7,0]  => :notify,
}
CSS_CLASS =
'composite'
CSS_HEAD_MAP =
{
  [0,0] =>  'th',
  [1,0] =>  'th',
  [2,0] =>  'th',
  [3,0] =>  'th',
  [4,0] =>  'th',
  [5,0] =>  'th',
}
CSS_MAP =
{
  [0,0,6] =>  'list',
  [6,0,1] =>  'list right',
}
LEGACY_INTERFACE =
false
LOOKANDFEEL_MAP =
{
  :description => :analysis_description,
}
SORT_DEFAULT =
:code

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

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) description(model)



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'src/view/analysis/result.rb', line 47

def description(model)
  link = PointerLink.new(:to_s, model, @session, self)
  text = model.send(@session.language).gsub("\n", ' ')
  if(text.size > 60)
    if(match = /^([\S]*block)/u.match(text))
      text = match[1]
    elsif(match = /^(Blutgase)/u.match(text))
      text = match[1]
    else
      text = text[0..60]
      text = text[0..text.rindex(" ")] << '...'
    end
  end
  link.value = text
  link
end

- (Object) list_title(model, key = :list_title)



63
64
65
66
67
68
69
# File 'src/view/analysis/result.rb', line 63

def list_title(model, key = :list_title)
  if(model.list_title)
    value = HtmlGrid::Value.new(key, model, @session, self)
    value.value = model.list_title.send(@session.language)
    value
  end
end