Files

Class Index [+]

Quicksearch

UbiquoDesign::Extensions::Helper

Public Instance Methods

design_tab(tabnav) click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 4
 4:       def design_tab(tabnav)
 5:         tabnav.add_tab do |tab|
 6:           tab.text = I18n.t("ubiquo.design.design")
 7:           tab.title = I18n.t("ubiquo.design.design_title")
 8:           tab.highlights_on({:controller => "ubiquo/pages"})
 9:           tab.highlights_on({:controller => "ubiquo/page_templates"})
10:           tab.highlights_on({:controller => "ubiquo/designs"})
11:           tab.link = ubiquo_pages_path
12:         end if ubiquo_config_call :design_permit, {:context => :ubiquo_design}
13:       end
human_localized_current_date(time=nil) click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 28
28:       def human_localized_current_date(time=nil)
29:         time = Time.now unless time
30:         time.strftime_locale("%A, %d de %B de %Y")
31:       end
parent_pages_for_select(pages, selected_page) click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 52
52:       def parent_pages_for_select(pages, selected_page)
53:         pages ||= []
54:         options = ["<option value=''>#{t('ubiquo.page.no_parent')}</option>"]
55:         pages.map do |page|
56:           options << "<option value='#{page.id}' title='#{page.url_name}'"
57:           options << " selected='true'" if page == selected_page
58:           options << ">#{page.name}</option>"
59:         end
60:         options.join("\n")
61:       end
render_generator_partial(name, options) click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 24
24:       def render_generator_partial(name, options)
25:         render(options.merge(:partial => "/" + name))
26:       end
static_pages_tab(tabnav) click to toggle source

(Not documented)

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 15
15:       def static_pages_tab(tabnav)
16:         tabnav.add_tab do |tab|
17:           tab.text =  I18n.t("ubiquo.design.static_pages.title")
18:           tab.title =  I18n.t("ubiquo.design.static_pages.title")
19:           tab.highlights_on({:controller => "ubiquo/static_pages"})
20:           tab.link = ubiquo_static_pages_path  
21:         end if ubiquo_config_call :static_pages_permit, {:context => :ubiquo_design}
22:       end
url_for_page(page, url_for_options = {}) click to toggle source

Return the url for a page

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/extensions/helper.rb, line 34
34:       def url_for_page(page, url_for_options = {})
35:         page = Page.find_by_key(page.to_s) unless page.is_a?(Page)
36:         page_url_for_options = {
37:           :controller => '/pages',
38:           :action => 'show',
39:           # FIXME split due to rails bug #5135
40:           :url => page.url_name.split('/'),
41:           :key => nil # to overwrite current key in params
42:         }
43:         url_for(page_url_for_options.merge(url_for_options))
44:       end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.