Class: ODDB::View::User::PluginInnerComposite

Inherits:
HtmlGrid::Composite show all
Defined in:
src/view/user/plugin.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :plugin_description,
  [0,1] =>  :plugin_javascript,
  [0,2] =>  :plugin_download_src,
  [0,3] =>  :plugin_download_gif,
}
CSS_MAP =
{
  [0,0,4,4] =>  'list',
}
LABELS =
false
DEFAULT_CLASS =
HtmlGrid::Value

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) plugin_description(model, session)



43
44
45
46
47
48
49
50
51
52
53
# File 'src/view/user/plugin.rb', line 43

def plugin_description(model, session)
  link = HtmlGrid::Link.new(:plugin_description, model, @session, self)
  if(@lookandfeel.language == 'de')
  link.href =  "http://wiki.oddb.org/wiki.php?pagename=ODDB.Direktsuche"
  elsif(@lookandfeel.language == 'fr')
  link.href = "http://wiki.oddb.org/wiki.php?pagename=ODDB.DirectCherche"
  elsif(@lookandfeel.language == 'en')
  link.href = "http://wiki.oddb.org/wiki.php?pagename=ODDB.Plugin"
  end
  link
end

- (Object) plugin_download_gif(model, session)



36
37
38
39
40
41
42
# File 'src/view/user/plugin.rb', line 36

def plugin_download_gif(model, session)
  link = HtmlGrid::Link.new(:plugin_download_gif, model, session, self)
  link.href = @lookandfeel.resource_global(:plugin_download_gif)
  link.label = true
  link.set_attribute('class', 'list')
  link
end

- (Object) plugin_download_src(model, session)



29
30
31
32
33
34
35
# File 'src/view/user/plugin.rb', line 29

def plugin_download_src(model, session)
  link = HtmlGrid::Link.new(:plugin_download_src, model, session, self)
  link.href = @lookandfeel.resource_global(:plugin_download_src)
  link.label = true
  link.set_attribute('class', 'list')
  link
end

- (Object) plugin_javascript(model, session)



22
23
24
25
26
27
28
# File 'src/view/user/plugin.rb', line 22

def plugin_javascript(model, session)
  link = HtmlGrid::Link.new(:plugin_javascript, model, session, self)
  link.href = "javascript:addEngine('oddb.org','gif','Health')"
  link.label = true
  link.set_attribute('class', 'list')
  link
end