Method: Spree::Admin::NavigationHelper#link_to_with_icon

Defined in:
app/helpers/spree/admin/navigation_helper.rb


92
93
94
95
96
97
98
99
# File 'app/helpers/spree/admin/navigation_helper.rb', line 92

def link_to_with_icon(icon_name, text, url, options = {})
  options[:class] = (options[:class].to_s + " fa fa-#{icon_name} icon_link with-tip").strip
  options[:class] += ' no-text' if options[:no_text]
  options[:title] = text if options[:no_text]
  text = options[:no_text] ? '' : raw("<span class='text'>#{text}</span>")
  options.delete(:no_text)
  link_to(text, url, options)
end