Sha256: da1d76c17abd0d9346a85aeb84e1f9c3636716f790cde0dda9cdb0fe0937fd51
Contents?: true
Size: 830 Bytes
Versions: 13
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true module Blacklight module Response # Render a pagination widget for search results class PaginationComponent < Blacklight::Component # @param [Blacklight::Response] response # @param [Hash] html html options for the pagination container def initialize(response:, html: {}, **pagination_args) @response = response @html = html @pagination_args = pagination_args end def html_attr { aria: { label: t('views.pagination.aria.container_label') } }.merge(@html) end def pagination args = configured_options.merge(@pagination_args).compact helpers.paginate @response, **args end def configured_options controller.blacklight_config.index.pagination_options end end end end
Version data entries
13 entries across 13 versions & 2 rubygems