Sha256: 474815cbcfee6e48c5a2e1a2bbfcdc17efa643f6f8b57b499f537c9504409228

Contents?: true

Size: 650 Bytes

Versions: 6

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require_relative './current_page_for_helper'
require_relative './total_pages_for_helper'

module Pagination
  module CurrentPageDescriptionForHelper
    include Pagination::CurrentPageForHelper
    include Pagination::TotalPagesForHelper

    def pagination_current_page_description_for(set)
      description = [
        'Page',
        "<strong>#{pagination_current_page_for(set)}</strong>",
        'of',
        "<strong>#{pagination_total_pages_for(set)}</strong>"
      ].join('&nbsp;').html_safe

      content_tag(:span,
                  description,
                  class: 'page-current')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
actionset-0.11.0 lib/action_set/helpers/pagination/current_page_description_for_helper.rb
actionset-0.10.0 lib/action_set/helpers/pagination/current_page_description_for_helper.rb
actionset-0.9.2 lib/action_set/helpers/pagination/current_page_description_for_helper.rb
actionset-0.9.1 lib/action_set/helpers/pagination/current_page_description_for_helper.rb
actionset-0.8.2 lib/action_set/helpers/pagination/current_page_description_for_helper.rb
actionset-0.8.1 lib/action_set/helpers/pagination/current_page_description_for_helper.rb