Module: CgAppBase::ApplicationHelper

Defined in:
app/helpers/cg_app_base/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#blueicon(klass_ending, title = '') ⇒ Object



15
16
17
# File 'app/helpers/cg_app_base/application_helper.rb', line 15

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

#customer_type_icon(customer_type) ⇒ Object



19
20
21
# File 'app/helpers/cg_app_base/application_helper.rb', line 19

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

#el_attr_name_to_id(name) ⇒ Object



7
8
9
# File 'app/helpers/cg_app_base/application_helper.rb', line 7

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

#icon(klass_ending, title = '', style = '') ⇒ Object



11
12
13
# File 'app/helpers/cg_app_base/application_helper.rb', line 11

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

Returns:

  • (Boolean)


3
4
5
# File 'app/helpers/cg_app_base/application_helper.rb', line 3

def navigation_on?
  session[:menu_layout] == 'true'
end