Project

General

Profile

« Previous | Next » 

Revision 933c8a83

Added by Amos Benari almost 12 years ago

  • ID 933c8a83d1b45e69c2c5802d7dada68d0fd73896

fixes the more menu bug

View differences:

app/helpers/home_helper.rb
#prevent adjacent dividers
last_item = nil
choices.map do |item|
choices.map! do |item|
if item == [:divider]
if last_item
last_item = nil
content_tag(:li, "", :class=>"divider")
end
elsif authorized_for(item[0], item[1])
elsif authorized_for(item[1], :index)
last_item = item
content_tag(:li,link_to( link_to(item[0], {:controller => item[1], :action => :index})))
end
end.compact
choices.pop if (choices.last.to_s =~ /divider/)
choices
end
def menu(tab, myBookmarks ,path = nil)

Also available in: Unified diff