fix indentation

pull/623/head
Jens Ulferts 11 years ago committed by Christian Ratz
parent e40d3e7e81
commit 528ac5c345
  1. 34
      lib/redmine/menu_manager/menu_helper.rb

@ -48,22 +48,30 @@ module Redmine::MenuManager::MenuHelper
WikiMenuItem.main_items(project_wiki).each do |main_item|
Redmine::MenuManager.loose :project_menu do |menu|
menu.push "#{main_item.item_class}".to_sym,
{ :controller => '/wiki', :action => 'show', :id => h(main_item.title) },
:param => :project_id,
:caption => main_item.name,
:after => :repository
menu.push :"#{main_item.item_class}_new_page", {:action=>"new_child", :controller=>"/wiki", :id => main_item.title },
:param => :project_id, :caption => :create_child_page,
:parent => "#{main_item.item_class}".to_sym if main_item.new_wiki_page and
WikiPage.find_by_wiki_id_and_title(project_wiki.id, main_item.title)
menu.push :"#{main_item.item_class}_toc", {:action => 'index', :controller => '/wiki', :id => main_item.title}, :param => :project_id, :caption => :label_table_of_contents, :parent => "#{main_item.item_class}".to_sym if main_item.index_page
{ :controller => '/wiki', :action => 'show', :id => h(main_item.title) },
:param => :project_id,
:caption => main_item.name,
:after => :repository
menu.push :"#{main_item.item_class}_new_page",
{ :action=>"new_child", :controller=>"/wiki", :id => h(main_item.title) },
:param => :project_id,
:caption => :create_child_page,
:parent => "#{main_item.item_class}".to_sym if main_item.new_wiki_page and
WikiPage.find_by_wiki_id_and_title(project_wiki.id, main_item.title)
menu.push :"#{main_item.item_class}_toc",
{ :action => 'index', :controller => '/wiki', :id => h(main_item.title) },
:param => :project_id,
:caption => :label_table_of_contents,
:parent => "#{main_item.item_class}".to_sym if main_item.index_page
main_item.children.each do |child|
menu.push "#{child.item_class}".to_sym,
{ :controller => '/wiki', :action => 'show', :id => child.title },
:param => :project_id, :caption => child.name, :parent => "#{main_item.item_class}".to_sym
{ :controller => '/wiki', :action => 'show', :id => h(child.title) },
:param => :project_id,
:caption => child.name,
:parent => "#{main_item.item_class}".to_sym
end
# FIXME using wiki_menu_item#title to reference the wiki page and wiki_menu_item#name as the menu item representation feels wrong
end

Loading…
Cancel
Save