Project

General

Profile

« Previous | Next » 

Revision f5037382

Added by Eric Helms over 10 years ago

Fixes #3838: Adds ability to define a divider when declaring a menu item
from a plugin.

View differences:

app/services/foreman/plugin.rb
@parent = current
end
def divider(menu, options = {})
Menu::Manager.map(menu).divider(options)
end
# Removes item from the given menu
def delete_menu_item(menu, item)
Menu::Manager.map(menu).delete(item)
app/services/menu/divider.rb
class Divider < Node
def initialize(name, options={})
@caption = options[:caption]
@parent = options.fetch(:parent, nil)
super name
end
......
true
end
end
end
end

Also available in: Unified diff