2
3
4
5
6
7
8
9
10
11
|
# File 'lib/forge/app/helpers/mobile_helper.rb', line 2
def (title, link, options = {})
li_class = ""
options[:alt_links].each { |a| li_class = request.fullpath.match(a) ? "active" : "" unless li_class == "active" } if options[:alt_links].is_a?(Array)
li_class = "active" if link == request.fullpath
li_class += " #{options[:icon]}" unless options[:icon].blank?
li_class += " #{options[:class]}" unless options[:class].blank?
icon = image_tag(options[:icon].blank? ? "mobile/arrow-nav.png" : "mobile/#{options[:icon]}.png", :class => "icon")
return content_tag(:li, link_to(title, link) + icon, :class => li_class)
end
|