Sha256: fe5c930f72645760fa20cde43e60f1da22925b30dd528cb597a84b0d9ffde4ca

Contents?: true

Size: 800 Bytes

Versions: 8

Compression:

Stored size: 800 Bytes

Contents

require 'blacklight_advanced_search/parsing_nesting_parser'

# This module gets included into CatalogController, or another SearchHelper
# includer, to add advanced search behavior
module BlacklightAdvancedSearch::Controller
  extend ActiveSupport::Concern

  included do
    # Display advanced search constraints properly
    helper BlacklightAdvancedSearch::RenderConstraintsOverride
    helper BlacklightAdvancedSearch::CatalogHelperOverride
    helper_method :is_advanced_search?, :advanced_query
  end

  def is_advanced_search?(req_params = params)
    (req_params[:search_field] == blacklight_config.advanced_search[:url_key]) ||
    req_params[:f_inclusive]
  end

  def advanced_query
    BlacklightAdvancedSearch::QueryParser.new(params, blacklight_config) if is_advanced_search?
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight_advanced_search-7.0.0 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.4.1 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.4.0 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.3.1 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.3.0 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.2.1 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.2.0 lib/blacklight_advanced_search/controller.rb
blacklight_advanced_search-6.1.0 lib/blacklight_advanced_search/controller.rb