Module: MiscHelper

Defined in:
app/helpers/misc_helper.rb

Instance Method Summary collapse

Instance Method Details

#content_classesObject



7
8
9
10
11
# File 'app/helpers/misc_helper.rb', line 7

def content_classes()
  classes = ""
  classes << @page.classes unless @page.nil? or @page.classes.nil?
  classes
end

#create_descriptionObject



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

def create_description
  truncate(strip_tags(content), :length => 50)
end

#delete_icon(type = "") ⇒ Object



17
18
19
# File 'app/helpers/misc_helper.rb', line 17

def delete_icon(type="")
  image_tag("admin/ui/delete-icon.png", :class =>"brush tip", :title => "Delete #{type}")
end

#edit_icon(type = "") ⇒ Object



13
14
15
# File 'app/helpers/misc_helper.rb', line 13

def edit_icon(type="")
  image_tag("admin/ui/edit-icon.png", :class =>"brush tip", :title => "Edit #{type}")
end

#index_icon(type = "") ⇒ Object



21
22
23
# File 'app/helpers/misc_helper.rb', line 21

def index_icon(type="")
  image_tag("admin/ui/index-icon.png", :class =>"eye tip", :title => "Show All #{type}")
end

#new_icon(type = "") ⇒ Object



25
26
27
# File 'app/helpers/misc_helper.rb', line 25

def new_icon(type="")
  image_tag("admin/ui/new-icon.png", :class =>"eye tip", :title => "Create New #{type}")
end