Sha256: 640e3e10d20d7bdc797d61d5c6ae96993eb2b534f4ff9c3ae0a71933191e436e

Contents?: true

Size: 581 Bytes

Versions: 17

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true
require "active_admin/filters/active"

module ActiveAdmin
  module Filters
    class ActiveSidebar < ActiveAdmin::SidebarSection

      def initialize
        super "search_status", sidebar_options
      end

      def block
        -> { active_filters_sidebar_content }
      end

      def title
        I18n.t("active_admin.search_status.headline")
      end

      protected

      def sidebar_options
        { only: :index, if: -> { active_admin_config.current_filters_enabled? && (params[:q] || params[:scope]) } }
      end

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
activeadmin-3.2.5 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.2.4 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.2.3 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.2.2 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.2.1 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.2.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.1.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-3.0.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.14.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.13.1 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.13.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.12.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.11.2 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.11.1 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.11.0 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.10.1 lib/active_admin/filters/active_sidebar.rb
activeadmin-2.10.0 lib/active_admin/filters/active_sidebar.rb