Sha256: e12182f4496ac583cba7a9f38f017d9fafe9d0c0acc8f53579d27f905c29a1cf

Contents?: true

Size: 573 Bytes

Versions: 3

Compression:

Stored size: 573 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  class StartOverButtonComponent < ::ViewComponent::Base
    def call
      link_to t('blacklight.search.start_over'), start_over_path, class: 'catalog_startOverLink btn btn-primary'
    end

    private

    ##
    # Get the path to the search action with any parameters (e.g. view type)
    # that should be persisted across search sessions.
    def start_over_path query_params = params
      Deprecation.silence(Blacklight::UrlHelperBehavior) do
        helpers.start_over_path(query_params)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-7.24.0 app/components/blacklight/start_over_button_component.rb
blacklight-7.23.0.1 app/components/blacklight/start_over_button_component.rb
blacklight-7.23.0 app/components/blacklight/start_over_button_component.rb