Sha256: ebc8f539bc2e69fb24b8c9f1726b677f9bfb2cc9f51e35aea1e791c7fd4b2eac

Contents?: true

Size: 544 Bytes

Versions: 7

Compression:

Stored size: 544 Bytes

Contents

module Alchemy
  module Admin
    class LanguagesController < ResourcesController
      def index
        @query = Language.on_current_site.ransack(params[:q])
        @languages = @query.result.page(params[:page] || 1).per(per_page_value_for_screen_size)
      end

      def new
        @language = Language.new
        @language.page_layout = configured_page_layout || @language.page_layout
      end

      private

      def configured_page_layout
        Config.get(:default_language).try('[]', 'page_layout')
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alchemy_cms-3.5.0 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.4.2 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.5.0.rc2 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.5.0.rc1 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.4.1 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.4.0 app/controllers/alchemy/admin/languages_controller.rb
alchemy_cms-3.4.0.rc1 app/controllers/alchemy/admin/languages_controller.rb