[#692] Fix syntax errors and undefined methods in layout from merge
This commit is contained in:
parent
83f8f63640
commit
32fa8cb522
|
@ -973,14 +973,21 @@ module ApplicationHelper
|
|||
split_top_menu_into_main_or_more_menus[:more]
|
||||
end
|
||||
|
||||
def help_menu_item
|
||||
split_top_menu_into_main_or_more_menus[:help]
|
||||
end
|
||||
|
||||
# Split the :top_menu into separate :main and :more items
|
||||
def split_top_menu_into_main_or_more_menus
|
||||
unless @top_menu_split
|
||||
items_for_main_level = []
|
||||
items_for_more_level = []
|
||||
help_menu = nil
|
||||
menu_items_for(:top_menu) do |item|
|
||||
if item.name == :home || item.name == :my_page
|
||||
items_for_main_level << item
|
||||
elsif item.name == :help
|
||||
help_menu = item
|
||||
elsif item.name == :projects
|
||||
# Remove, present in layout
|
||||
else
|
||||
|
@ -989,7 +996,8 @@ module ApplicationHelper
|
|||
end
|
||||
@top_menu_split = {
|
||||
:main => items_for_main_level,
|
||||
:more => items_for_more_level
|
||||
:more => items_for_more_level,
|
||||
:help => help_menu
|
||||
}
|
||||
end
|
||||
@top_menu_split
|
||||
|
|
Loading…
Reference in New Issue