Sha256: c2ed061ab4bc366caee2fe2eb8b47f02341b9e3c90b1df674a451f97e2f666cb

Contents?: true

Size: 484 Bytes

Versions: 3

Compression:

Stored size: 484 Bytes

Contents

module Fe::AnswerPagesHelper
  
  # page sidebar navigation
  def li_page_active_if(condition, attributes = {}, &block)
    if condition
      attributes[:class] ||= ''
      attributes[:class] += " active"
    end
    content_tag("li", attributes, &block)
  end
  
  # prepares the javascript function call to load a page
  def load_page_js(page_link)
    return '' if page_link.nil?
    
    %{$.fe.pageHandler.loadPage('#{page_link.dom_id}','#{page_link.load_path}')}
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fe-1.0.0 app/helpers/fe/answer_pages_helper.rb
fe-0.0.4 app/helpers/fe/answer_pages_helper.rb
fe-0.0.3 app/helpers/fe/answer_pages_helper.rb