Class: ODDB::Html::View::Links

Inherits:
HtmlGrid::Component
  • Object
show all
Defined in:
lib/oddb/html/view/navigation.rb

Direct Known Subclasses

CountryLinks, HelpLinks, Navigation

Instance Method Summary collapse

Instance Method Details

#initObject



10
11
12
13
# File 'lib/oddb/html/view/navigation.rb', line 10

def init
  super
  @value = links(link_keys)
end


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/oddb/html/view/navigation.rb', line 14

def links(keys)
  current = @session.direct_event
  keys.collect { |event|
    link = HtmlGrid::Link.new(event, @model, @session, self) 
    if(self.respond_to?(event))
      self.send(event, link)
    elsif(current != event)
      link.href = @lookandfeel._event_url(event)
    end
    link
  }
end