Sha256: 49a6b4219f70ac286aadc6cc6e18686b8bfd2ce18e29d3af6eb54309d7f46c1d

Contents?: true

Size: 478 Bytes

Versions: 12

Compression:

Stored size: 478 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

12 entries across 12 versions & 2 rubygems

Version Path
qbrick-2.5.0.pre app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.4.3 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.4.2 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.4.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.4.0 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.6 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.5 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.4 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.3 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.2 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.1 app/helpers/kuhsaft/cms/admin_helper.rb
kuhsaft-2.3.0 app/helpers/kuhsaft/cms/admin_helper.rb