Module: ODDB::View::ExternalLinks

Included in:
CenteredSearchComposite, DataFormat, Drugs::CompareSearchForm, Drugs::DDDTree, ExplainResult, Navigation, ResultFoot
Defined in:
src/view/external_links.rb

Instance Method Summary (collapse)

Instance Method Details



7
8
9
10
11
12
# File 'src/view/external_links.rb', line 7

def contact_link(model, session=@session)
  link = NavigationLink.new(:contact_link, 
    model, @session, self)
  link.href = @lookandfeel.lookup(:contact_href)
  link
end

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

meddrugs_update, data_declaration and legal_note: extrawurst for just-medical



41
42
43
# File 'src/view/external_links.rb', line 41

def data_declaration(model, session=@session)
  wiki_link(model, :data_declaration, :datadeclaration_pagename)
end


13
14
15
16
17
18
19
20
# File 'src/view/external_links.rb', line 13

def external_link(model, key)
  klass = if(@lookandfeel.enabled?(:popup_links, false))
    HtmlGrid::PopupLink
  else
    HtmlGrid::Link
  end
  klass.new(key, model, @session, self)
end


21
22
23
# File 'src/view/external_links.rb', line 21

def faq_link(model, session=@session)
  wiki_link(model, :faq_link, :faq_pagename)
end

- (Object) generic_definition(model, session)



24
25
26
27
28
29
# File 'src/view/external_links.rb', line 24

def generic_definition(model, session)
  link = HtmlGrid::Link.new(:generic_definition, model, session, self)
  link.href = @lookandfeel.lookup(:generic_definition_url)
  link.set_attribute('class', 'list')
  link
end


30
31
32
# File 'src/view/external_links.rb', line 30

def help_link(model, session=@session)
  wiki_link(model, :help_link, :help_pagename)
end


44
45
46
# File 'src/view/external_links.rb', line 44

def legal_note(model, session=@session)
  wiki_link(model, :legal_note, :legal_note_pagename)
end

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



47
48
49
50
51
52
53
# File 'src/view/external_links.rb', line 47

def meddrugs_update(model, session=@session)
  link = NavigationLink.new(:meddrugs_update, 
    model, @session, self)
  link.href = "http://www.just-medical.ch/mdupdate.cfm"
  link.set_attribute('target', '_top')
  link
end


33
34
35
36
37
38
# File 'src/view/external_links.rb', line 33

def wiki_link(model, key, namekey)
  link = external_link(model, key)
  name = @lookandfeel.lookup(namekey)
  link.href = "http://wiki.oddb.org/wiki.php?pagename=#{name}"
  link
end