Class: ODDB::View::Copyright

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

Constant Summary

COMPONENTS =
{
  [0,0]     =>  :lgpl_license,
  [1,0]     =>  'comma_separator',
  [2,0]     =>  :current_year,
  [3,0]     =>  :cpr_link,
  [4,0]     =>  :oddb_version,
}
COMPONENT_CSS_MAP =
{
  [0,0,5] => 'subheading',
}
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details



28
29
30
31
32
# File 'src/view/copyright.rb', line 28

def cpr_link(model)
  link = standard_link(:cpr_link, model)
  link.href = 'http://www.ywesee.com'
  link
end

- (Object) current_year(model)



38
39
40
# File 'src/view/copyright.rb', line 38

def current_year(model)
  Time.now.year.to_s
end

- (Object) lgpl_license(model)



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

def lgpl_license(model)
  link = standard_link(:lgpl_license, model)
  link.href = 'http://www.gnu.org/copyleft/lesser.html'
  link
end

- (Object) oddb_version(model)



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

def oddb_version(model)
  link = standard_link(:oddb_version, model)
  link.href = 'http://scm.ywesee.com/?p=oddb.org;a=summary'
  link.set_attribute('title', ODDB_VERSION)
  link
end


41
42
43
44
45
46
47
48
49
50
# File 'src/view/copyright.rb', line 41

def standard_link(key, model)
  klass = if(@lookandfeel.enabled?(:popup_links, false))
    HtmlGrid::PopupLink
  else
    HtmlGrid::Link
  end
  link = klass.new(key, model, @session, self)
  #link.css_class = 'navigation'
  link
end