Sha256: 97585a4752117040f1685a6d27a3adc441233762168d9ee0998fdf2048300a6b
Contents?: true
Size: 760 Bytes
Versions: 4
Compression:
Stored size: 760 Bytes
Contents
module Aureus class Navigation < Renderable def initialize @title = "" @buttons = Array.new end def title title @title = title end def button content @buttons << NavigationButton.new(content) end def submit_form_button resource, text @buttons << NavigationButton.new(content_tag("a",text,:onclick=>"aureus_trigger_form('form.#{resource.class.name.underscore}')")) end def render content_tag "div", :id => "navigation" do compact content_tag("h2", content_tag("span",@title)), content_tag("ul", compact_render(*@buttons), :id => "quicklinks") end end end class NavigationButton < Renderable def initialize content @content = content end def render content_tag "li", @content end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
aureus-1.3.1 | lib/aureus/navigation.rb |
aureus-1.3.0 | lib/aureus/navigation.rb |
aureus-1.2.2 | lib/aureus/navigation.rb |
aureus-1.2.1 | lib/aureus/navigation.rb |