Sha256: e110a6c9c89714109726119ace09103796793f56497fb8918cf5f173cb647a8b

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

module CgAppBase
  module ApplicationHelper
    def navigation_on?
      session[:menu_layout] == 'true' && !params[:no_menu_layout]
    end

    def el_attr_name_to_id(name)
      name.gsub(/\]/, '').gsub(/\[/, '_')
    end

    def icon(klass_ending, title='', style='')
      "<i style='#{style}' class='icon-#{klass_ending}'></i> #{title}".html_safe
    end

    def blueicon(klass_ending, title='')
      icon("#{klass_ending} text-blue", title)
    end

    def customer_type_icon(customer_type)
      icon("#{customer_type == 'COMMERCIAL' ? 'group' : 'user'}")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cg_app_base-1.0.62 app/helpers/cg_app_base/application_helper.rb
cg_app_base-1.0.56 app/helpers/cg_app_base/application_helper.rb
cg_app_base-1.0.55 app/helpers/cg_app_base/application_helper.rb
cg_app_base-1.0.54 app/helpers/cg_app_base/application_helper.rb