Project

General

Profile

Feature #2194 ยป menu_manager.diff

Jean-Baptiste Barth, 2008-11-15 05:45

View differences:

lib/redmine/menu_manager.rb (working copy)
end
caption = item.caption(project)
caption = l(caption) if caption.is_a?(Symbol)
#warning: this "==" is re-defined in "MenuItem" class
if block_given?
yield item, caption, url, (current_menu_item == item.name)
yield item, caption, url, (item == current_menu_item)
else
items << [item, caption, url, (current_menu_item == item.name)]
items << [item, caption, url, (item == current_menu_item)]
end
end
end
......
@param = options[:param] || :id
@caption = options[:caption]
@html_options = options[:html] || {}
@for = options[:for] || []
end
def ==(other)
@for.blank? ? @name == other : @for.include?(other.to_sym)
end
def caption(project=nil)
if @caption.is_a?(Proc)
c = @caption.call(project).to_s
    (1-1/1)