Sha256: 21a9ab1a07b2c6413760c1885598acc1726671fb9acb46f344ad0fbb52aeb289

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

module DataMapper
  module Pagination

    @defaults = {
      :per_page      => 6,
      :size          => 7,
      :pager_class   => 'pager',
      :previous_text => 'Previous',
      :next_text     => 'Next',
      :first_text    => 'First',
      :last_text     => 'Last',
      :more_text     => '...'
    }

    ##
    # Default pagination values.
    #
    # === Options
    #
    #   :per_page       Records per page; defaults to 6
    #   :size           Number of intermediate page number links to be shown; Defaults to 7
    #   :pager_class    Class for the div that contains the pagination links, defaults to 'pager'
    #   :previous_text  Text for the 'previous' link, defaults to 'Previous'
    #   :next_text      Text for the 'next' link, defaults to 'Next'
    #   :first_text     Text for the 'first' link, defaults to 'First'
    #   :last_text      Text for the 'last' link, defaults to 'Last'
    #   :more_text      Text for the 'more' indicator, defaults to '...'
    #
    # === Examples
    #
    #   DataMapper::Pagination.defaults[:size] = 5
    #
    
    def self.defaults
      @defaults
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dm-pager-1.0.2 lib/dm-pager/defaults.rb
dm-pager-1.0.1 lib/dm-pager/defaults.rb
dm-pager-1.0.0 lib/dm-pager/defaults.rb
dm-pager-0.0.8 lib/dm-pager/defaults.rb
dm-pager-0.0.7 lib/dm-pager/defaults.rb