Sha256: 89baafb66c76f3663a9fd7eacb30dc87b93c23bb55caddef52553eed2e9bdcaa

Contents?: true

Size: 485 Bytes

Versions: 21

Compression:

Stored size: 485 Bytes

Contents

module Kuhsaft
  module Cms
    module AdminHelper

      def render_language_switch?
        I18n.available_locales.size > 1
      end

      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
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
kuhsaft-2.2.6 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.5 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.4 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.3 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.2 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.2.0 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.1.2 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.1.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.1.0 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.8.6 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.8.5 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.0.3 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.0.2 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.8.4 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.8.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.0.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.0.0 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.8.0 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-1.7.1 app/helpers/kuhsaft/cms/admin_helper.rb