Module: MobileHelper
- Defined in:
- lib/forge/app/helpers/mobile_helper.rb
Instance Method Summary collapse
Instance Method Details
#mobile_color ⇒ Object
17 18 19 |
# File 'lib/forge/app/helpers/mobile_helper.rb', line 17 def mobile_color MySettings.mobile_color.blank? ? "#ee3124" : MySettings.mobile_color end |
#mobile_logo ⇒ Object
13 14 15 |
# File 'lib/forge/app/helpers/mobile_helper.rb', line 13 def mobile_logo MySettings.logo_url.blank? ? MySettings.site_title : image_tag(MySettings.logo_url) end |
#mobile_menu_item(title, link, options = {}) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/forge/app/helpers/mobile_helper.rb', line 2 def (title, link, = {}) li_class = "" #set the link class to active if it matches the current link or any of the alternate supplied links [:alt_links].each { |a| li_class = request.fullpath.match(a) ? "active" : "" unless li_class == "active" } if [:alt_links].is_a?(Array) li_class = "active" if link == request.fullpath li_class += " #{[:icon]}" unless [:icon].blank? li_class += " #{[:class]}" unless [:class].blank? icon = image_tag([:icon].blank? ? "mobile/arrow-nav.png" : "mobile/#{[:icon]}.png", :class => "icon") return content_tag(:li, link_to(title, link) + icon, :class => li_class) end |