Class: ODDB::Html::View::WelcomeHead

Inherits:
Head
  • Object
show all
Defined in:
lib/oddb/html/view/head.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => :user,
  [0,1] => :welcome,
  [0,2] => :logo,
}
CSS_ID_MAP =
["user", "welcome"]

Instance Method Summary collapse

Methods inherited from Head

#google_ads, #logo, #user

Instance Method Details



70
71
72
73
74
# File 'lib/oddb/html/view/head.rb', line 70

def url_link(url)
  link = HtmlGrid::Link.new(:none, model, @session, self)
  link.href = link.value = url
  link
end

#welcome(model) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/oddb/html/view/head.rb', line 52

def welcome(model)
  return unless @lookandfeel.enabled?(:welcome)
  link = HtmlGrid::Link.new(:welcome_drugs, model, @session, self)
  link.value.gsub!("\n", "<br>")
  link.href = @lookandfeel.lookup(:screencast_url)
  span = HtmlGrid::Span.new(model, @session, self)
  span.css_id = "data_declaration"
  span.value = @lookandfeel.lookup(:welcome_data_declaration)
  span.dojo_title = [
    @lookandfeel.lookup(:drugs_fixprices), "\n",
    url_link("http://www.dimdi.de/static/de/amg/fbag/index.htm"),
    "\n\n", @lookandfeel.lookup(:drugs_copay_free), "\n", 
    url_link("https://www.gkv-spitzenverband.de/Befreiungsliste_Arzneimittel_Versicherte.gkvnet"),
    "\n\n", @lookandfeel.lookup(:drugs_atc_codes), "\n",
    url_link("http://www.whocc.no/atcddd/"),
  ]
  [ link, span ]
end