26 lines
656 B
Ruby
26 lines
656 B
Ruby
module ApplicationHelper
|
|
|
|
def flash_class(level)
|
|
case level
|
|
when :notice then "alert alert-info fade-in"
|
|
when :success then "alert alert-success fade-in"
|
|
when :error then "alert alert-error fade-in"
|
|
when :alert then "alert alert-error fade-in"
|
|
end
|
|
end
|
|
|
|
# For Pageless
|
|
# def pageless(total_pages, url=nil, container=nil)
|
|
# opts = {
|
|
# :totalPages => total_pages,
|
|
# :url => url,
|
|
# :loaderMsg => 'Loading more pages...',
|
|
# :loaderImage => image_path('load.gif')
|
|
# }
|
|
|
|
# container && opts[:container] ||= container
|
|
|
|
# javascript_tag("$('#{container}').pageless(#{opts.to_json});")
|
|
# end
|
|
end
|