Class: ODDB::View::Drugs::Package

Inherits:
PrivateTemplate show all
Includes:
PartSize
Defined in:
src/view/drugs/package.rb

Constant Summary

CONTENT =
View::Drugs::PackageComposite
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 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)



274
275
276
277
278
279
280
281
282
283
284
# File 'src/view/drugs/package.rb', line 274

def meta_tags(context)
  base = @model.name_base
  size = comparable_size(@model)
  fullname = u sprintf("%s, %s", base, size)
  res = super << context.meta('name' => 'title', 'content' => fullname)
  if ind = @model.indication
    res << context.meta('name' => 'description',
                        'content' => ind.send(@session.language))
  end
  res
end