Class: ODDB::View::Drugs::DDDPrice

Inherits:
PrivateTemplate show all
Includes:
InsertBackbutton, PartSize
Defined in:
src/view/drugs/ddd_price.rb

Constant Summary

CONTENT =
DDDPriceComposite
SNAPBACK_EVENT =
:result
JAVASCRIPTS =
['bit.ly']

Constants inherited from PrivateTemplate

SEARCH_HEAD

Constants inherited from PrivateTemplate

SEARCH_HEAD

Constants included from Snapback

SNAPBACK_EVENT

Constants inherited from PublicTemplate

COMPONENTS, CONTENT, CSS_CLASS, DOJO_DEBUG, DOJO_ENCODING, DOJO_PARSE_WIDGETS, DOJO_PREFIX, DOJO_REQUIRE, FOOT, HEAD, HTTP_HEADERS, META_TAGS

Instance Method Summary (collapse)

Methods included from PartSize

#comparable_size, #part_size

Methods included from InsertBackbutton

#back_button, #backtracking, #reorganize_components

Methods inherited from PrivateTemplate

#backtracking, #init, #reorganize_components

Methods included from Snapback

#snapback

Methods inherited from PublicTemplate

#content, #css_link, #dynamic_html_headers, #foot, #head, #init, #javascripts, #title, #title_part_three, #topfoot

Methods included from Custom::HeadMethods

#just_medical, #oekk_head

Instance Method Details

- (Object) meta_tags(context)



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'src/view/drugs/ddd_price.rb', line 155

def meta_tags(context)
  base = @model.name_base
  size = comparable_size(@model)
  fullname = u sprintf("%s, %s", base, size)
  title = @lookandfeel.lookup(:ddd_chart_title, fullname)
  file = sprintf "%s_%s_%s.png", @model.ikskey, @model.name_base,
                                 @lookandfeel.lookup(:ddd_price_comparison)
  args = [
    :for, file.gsub(/\s+/, '_')
  ]
  url = @lookandfeel._event_url(:ddd_chart, args)
  res = super << context.meta('name' => 'title', 'content' => title) \
    << context.link('rel' => 'image_src', 'href' => url)
  if ind = @model.indication
    res << context.meta('name' => 'description',
                        'content' => ind.send(@session.language))
  end
  res
end

- (Object) pointer_descr(model)



174
175
176
# File 'src/view/drugs/ddd_price.rb', line 174

def pointer_descr(model)
  @lookandfeel.lookup(:ddd_price_for, model.name_base)
end