Class: ODDB::View::Drugs::ResultLimitList

Inherits:
HtmlGrid::List show all
Includes:
AdditionalInformation, ODDB::View::DataFormat
Defined in:
src/view/drugs/resultlimit.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :minifi,
  [1,0] =>  :fachinfo,
  [2,0] =>  :patinfo,
  [3,0] =>  :narcotic,
  [4,0] =>  :name_base,
  [5,0] =>  :galenic_form,
  [6,0] =>  :comparable_size,
  [7,0] =>  :price_exfactory,
  [8,0] =>  :price_public,
  [9,0] =>  :ikscat,
  [10,0]  => :feedback,
  [11,0]  =>  :google_search,
  [12,0]  => :notify,
}
DEFAULT_CLASS =
HtmlGrid::Value
CSS_CLASS =
'composite'
SORT_HEADER =
false
CSS_MAP =
{
  [0,0,4] =>  'list',
  [4,0] => 'list big',
  [5,0] => 'list',
  [6,0,4] => 'list right',
  [10,0,3]=>  'list right',
}
CSS_HEAD_MAP =
{
  [6,0] => 'th right',
  [7,0] => 'th right',
  [8,0] => 'th right',
  [9,0] => 'th right',
  [10,0] => 'th right',
  [11,0] => 'th right',
  [12,0] => 'th right',
}

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Methods included from AdditionalInformation

#_fachinfo, #atc_ddd_link, #atc_description, #comarketing, #complementary_type, #compositions, #ddd_price, #deductible, #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 AtcDddLink

#atc_ddd_link

Methods included from ODDB::View::DataFormat

#breakline, #company_name, #price, #price_exfactory, #price_public

Methods included from ExternalLinks

#contact_link, #data_declaration, #external_link, #faq_link, #generic_definition, #help_link, #legal_note, #meddrugs_update, #wiki_link

Instance Method Details

- (Object) compose_empty_list(offset)



51
52
53
54
55
56
57
58
59
60
61
62
# File 'src/view/drugs/resultlimit.rb', line 51

def compose_empty_list(offset)
  count = @session.state.package_count.to_i
  if(count > 0)
    @grid.add(@lookandfeel.lookup(:query_limit_empty, 
      @session.state.package_count, 
      @session.class.const_get(:QUERY_LIMIT)), *offset)
    @grid.add_attribute('class', 'list', *offset)
    @grid.set_colspan(*offset)
  else
    super
  end
end

- (Object) fachinfo(model, session)



63
64
65
# File 'src/view/drugs/resultlimit.rb', line 63

def fachinfo(model, session)
  super(model, session, 'square important infos')
end

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



69
70
71
72
73
# File 'src/view/drugs/resultlimit.rb', line 69

def most_precise_dose(model, session=@session)
  model.pretty_dose || if(model.active_agents.size == 1)
    model.dose
  end
end

- (Object) name_base(model, session)



66
67
68
# File 'src/view/drugs/resultlimit.rb', line 66

def name_base(model, session)
  model.name_base
end