Sha256: e30eaa128899b821941566ec4c57517ecfc0d33c31826c335201235ca25643b2

Contents?: true

Size: 519 Bytes

Versions: 19

Compression:

Stored size: 519 Bytes

Contents

module BMC::PaginationHelper
  class << self
    attr_writer :theme

    def theme
      @theme ||= "bootstrap4"
    end
  end

  def paginate(objects, options = {})
    options = {theme: BMC::PaginationHelper.theme}.merge(options)
    super(objects, **options).gsub(/>(\s+)</, "><").html_safe
  end

  def pagination_infos(collection)
    tag.p(class: "pagination-infos") { page_entries_info(collection) }
  end

  def pagination_and_infos(collection)
    paginate(collection) + pagination_infos(collection)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
bmc-1.6.1 app/helpers/bmc/pagination_helper.rb
bmc-1.6.0 app/helpers/bmc/pagination_helper.rb
bmc-1.5.1 app/helpers/bmc/pagination_helper.rb
bmc-1.5.0 app/helpers/bmc/pagination_helper.rb
bmc-1.4.3 app/helpers/bmc/pagination_helper.rb
bmc-1.4.2 app/helpers/bmc/pagination_helper.rb
bmc-1.4.1 app/helpers/bmc/pagination_helper.rb
bmc-1.4.0 app/helpers/bmc/pagination_helper.rb
bmc-1.3.5 app/helpers/bmc/pagination_helper.rb
bmc-1.3.4 app/helpers/bmc/pagination_helper.rb
bmc-1.3.3 app/helpers/bmc/pagination_helper.rb
bmc-1.3.2 app/helpers/bmc/pagination_helper.rb
bmc-1.3.1 app/helpers/bmc/pagination_helper.rb
bmc-1.3.0 app/helpers/bmc/pagination_helper.rb
bmc-1.2.1 app/helpers/bmc/pagination_helper.rb
bmc-1.2.0 app/helpers/bmc/pagination_helper.rb
bmc-1.1.0 app/helpers/bmc/pagination_helper.rb
bmc-1.0.1 app/helpers/bmc/pagination_helper.rb
bmc-1.0.0 app/helpers/bmc/pagination_helper.rb