[#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]
|
split_top_menu_into_main_or_more_menus[:more]
|
||||||
end
|
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
|
# Split the :top_menu into separate :main and :more items
|
||||||
def split_top_menu_into_main_or_more_menus
|
def split_top_menu_into_main_or_more_menus
|
||||||
unless @top_menu_split
|
unless @top_menu_split
|
||||||
items_for_main_level = []
|
items_for_main_level = []
|
||||||
items_for_more_level = []
|
items_for_more_level = []
|
||||||
|
help_menu = nil
|
||||||
menu_items_for(:top_menu) do |item|
|
menu_items_for(:top_menu) do |item|
|
||||||
if item.name == :home || item.name == :my_page
|
if item.name == :home || item.name == :my_page
|
||||||
items_for_main_level << item
|
items_for_main_level << item
|
||||||
|
elsif item.name == :help
|
||||||
|
help_menu = item
|
||||||
elsif item.name == :projects
|
elsif item.name == :projects
|
||||||
# Remove, present in layout
|
# Remove, present in layout
|
||||||
else
|
else
|
||||||
|
@ -989,7 +996,8 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
@top_menu_split = {
|
@top_menu_split = {
|
||||||
:main => items_for_main_level,
|
:main => items_for_main_level,
|
||||||
:more => items_for_more_level
|
:more => items_for_more_level,
|
||||||
|
:help => help_menu
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@top_menu_split
|
@top_menu_split
|
||||||
|
|
Loading…
Reference in New Issue