Sha256: 44ac1a5b318628eaf2ce73590f68c975052b37714326fc9537773efc161664c1

Contents?: true

Size: 1.04 KB

Versions: 14

Compression:

Stored size: 1.04 KB

Contents

module ApplicationHelper
  def menu_node(name, url)
    content_tag(:li, content_tag(:a, content_tag(:span, name, :class=>name.underscore.gsub(/ /, '_')), :href=>url))
  end

  def sidebar_link(name, url, is_title = false)
    _class = name.underscore.gsub(/ /, '_')
    _class += "sidebar_title" if is_title
    content_tag(:li, content_tag(:a, content_tag(:span, name, :class=>name.underscore), :href=>url), :class=>_class)
  end

  def sidebar_content(&block)
    @sidebar = true
    content_for(:sidebar) do
      block.call
    end
  end

  def nav_content(&block)
    @sidebar = true
    content_for(:navigation) do
      block.call
    end
  end

  def include_ckeditor
    content_for :head do
      javascript_include_tag('/ckeditor/ckeditor.js',
        '/ckeditor/adapters/jquery.js',
        "galleries/configure_ckeditor.js")
    end
  end
  def session_key_name
    Rails.application.config.session_options[:key]
  end
  def make_session_string
    arr = []
    request.env['HTTP_COOKIE'].each_char{|c| arr.push(c[0].to_s)}
    arr.join("x")
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wheels-0.1.30 app/helpers/application_helper.rb
wheels-0.1.28 app/helpers/application_helper.rb
wheels-0.1.27 app/helpers/application_helper.rb
wheels-0.1.25 app/helpers/application_helper.rb
wheels-0.1.24 app/helpers/application_helper.rb
wheels-0.1.23 app/helpers/application_helper.rb
wheels-0.1.22 app/helpers/application_helper.rb
wheels-0.1.21 app/helpers/application_helper.rb
wheels-0.1.20 app/helpers/application_helper.rb
wheels-0.1.19 app/helpers/application_helper.rb
wheels-0.1.18 app/helpers/application_helper.rb
wheels-0.1.17 app/helpers/application_helper.rb
wheels-0.1.13 app/helpers/application_helper.rb
wheels-0.1.12 app/helpers/application_helper.rb