Module: Qe::AnswerPagesHelper
- Defined in:
- app/helpers/qe/answer_pages_helper.rb
Instance Method Summary collapse
-
#li_page_active_if(condition, attributes = {}, &block) ⇒ Object
page sidebar navigation.
-
#load_page_js(page_link) ⇒ Object
prepares the javascript function call to load a page.
Instance Method Details
#li_page_active_if(condition, attributes = {}, &block) ⇒ Object
page sidebar navigation
7 8 9 10 11 12 13 |
# File 'app/helpers/qe/answer_pages_helper.rb', line 7 def li_page_active_if(condition, attributes = {}, &block) if condition attributes[:class] ||= '' attributes[:class] += " active" end content_tag("li", attributes, &block) end |
#load_page_js(page_link) ⇒ Object
prepares the javascript function call to load a page
16 17 18 19 20 |
# File 'app/helpers/qe/answer_pages_helper.rb', line 16 def load_page_js(page_link) return '' if page_link.nil? %{$.qe.pageHandler.loadPage('#{page_link.dom_id}','#{page_link.load_path}')} end |