Module: Fe::AnswerPagesHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/fe/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
4 5 6 7 8 9 10 |
# File 'app/helpers/fe/answer_pages_helper.rb', line 4 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
13 14 15 16 17 |
# File 'app/helpers/fe/answer_pages_helper.rb', line 13 def load_page_js(page_link) return '' if page_link.nil? %{$.fe.pageHandler.loadPage('#{page_link.dom_id}','#{page_link.load_path}')} end |