|
|
|
@ -86,9 +86,9 @@ module Redmine
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Renders the application main menu
|
|
|
|
|
# Renders the application main menu
|
|
|
|
|
def render_main_menu(project)
|
|
|
|
|
render_menu((project && !project.new_record?) ? :project_menu : :application_menu, project)
|
|
|
|
|
render_menu((project && !project.new_record?) ? :project_menu : :application_menu, project)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def display_main_menu?(project)
|
|
|
|
@ -121,12 +121,14 @@ module Redmine
|
|
|
|
|
return render_menu_node_with_children(node, project)
|
|
|
|
|
else
|
|
|
|
|
caption, url, selected = extract_node_details(node, project)
|
|
|
|
|
unless url.to_s.include?( 'code_review')
|
|
|
|
|
return content_tag('li',
|
|
|
|
|
render_single_menu_node(node, caption, url, selected))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def render_menu_node_with_children(node, project=nil)
|
|
|
|
|
def render_menu_node_with_children(node, project=nil)
|
|
|
|
|
caption, url, selected = extract_node_details(node, project)
|
|
|
|
|
|
|
|
|
|
html = [].tap do |html|
|
|
|
|
@ -170,9 +172,9 @@ module Redmine
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def render_single_menu_node(item, caption, url, selected)
|
|
|
|
|
unless url.include?('code_review')
|
|
|
|
|
|
|
|
|
|
link_to(h(caption), url, item.html_options(:selected => selected))
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def render_unattached_menu_item(menu_item, project)
|
|
|
|
|