Class: Spark::NavMenuHelper::NavMenu

Inherits:
MenuHelper::Menu show all
Defined in:
app/helpers/spark/nav_menu_helper.rb

Constant Summary

Constants inherited from MenuHelper::Menu

MenuHelper::Menu::DEFAULTS

Instance Method Summary collapse

Methods inherited from MenuHelper::Menu

#display, #group, #header, #item, #link

Constructor Details

#initialize(title = nil, options = {}) ⇒ NavMenu

Returns a new instance of NavMenu.



9
10
11
12
13
14
15
# File 'app/helpers/spark/nav_menu_helper.rb', line 9

def initialize( title = nil, options = {} )
  config({
    tag: :nav,
    base_class: 'nav-menu'
  })
  super( title, options )
end

Instance Method Details

#more(content = nil, url = nil, options = nil, &block) ⇒ Object



17
18
19
20
21
22
23
24
# File 'app/helpers/spark/nav_menu_helper.rb', line 17

def more( content=nil, url=nil, options=nil, &block )
  content, url, options = parse_item_args( content, url, options, &block)
  options['aria-haspopup'] = 'true'
  options = add_class( options, config[:base_class] + "-more" )
  url ||= '#'

  item( content, url, options )
end