Module: Kuhsaft::Cms::AdminHelper

Defined in:
app/helpers/kuhsaft/cms/admin_helper.rb

Instance Method Summary collapse

Instance Method Details



9
10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/kuhsaft/cms/admin_helper.rb', line 9

def link_to_content_locale(locale)
  action = params[:action]
  if params[:action] == 'create'
    action = 'new'
  elsif params[:action] == 'update'
    action = 'edit'
  end

  link_to locale.to_s.upcase, url_for(
    :action => action, :content_locale => locale)
end

#render_language_switch?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/helpers/kuhsaft/cms/admin_helper.rb', line 5

def render_language_switch?
  I18n.available_locales.size > 1
end