├── .gitignore ├── Gemfile ├── MIT-LICENSE ├── README.markdown ├── Rakefile ├── example └── app.rb ├── lib ├── bootstrap_pagination │ ├── action_view.rb │ ├── bootstrap_renderer.rb │ ├── sinatra.rb │ └── version.rb ├── will_paginate-bootstrap.rb └── will_paginate │ └── bootstrap.rb ├── pagination.png ├── spec └── pagination_spec.rb └── will_paginate-bootstrap.gemspec /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | Gemfile.lock 4 | pkg/* 5 | .idea/ 6 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | # Specify your gem's dependencies in will_paginate-bootstrap.gemspec 4 | gemspec 5 | 6 | group :development do 7 | gem "rake" 8 | gem "nokogiri" 9 | gem "minitest" 10 | end 11 | 12 | group :example_app do 13 | gem "sinatra" 14 | end -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Nicholas Dainty 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # will_paginate-bootstrap 2 | 3 | --- 4 | 5 | __No longer maintained__ 6 | 7 | I'm no longer using Bootstrap with Rails, so unfortunately am no longer accepting pull requests or maintaining this library. Feel free to fork this repository in order to publish your changes, or get in touch with me if you'd like to take over maintenance of the gem. 8 | 9 | --- 10 | 11 | [](https://codeclimate.com/github/bootstrap-ruby/will_paginate-bootstrap) 12 | 13 |  14 | 15 | This gem integrates the [Twitter Bootstrap](http://getbootstrap.com/) [pagination component](http://getbootstrap.com/components/#pagination) with the [will_paginate](https://github.com/mislav/will_paginate) pagination gem. 16 | 17 | Just like will_paginate, Rails and Sinatra are supported. 18 | 19 | ## Install 20 | 21 | * `gem install will_paginate-bootstrap`, *or* 22 | * For projects using Bundler, add `gem 'will_paginate-bootstrap'` to your `Gemfile` (and then run `bundle install`). 23 | 24 | ## Usage 25 | 26 | ### Rails 27 | 28 | 1. Load the Bootstrap CSS in your template. 29 | 2. In your view, use the `renderer: BootstrapPagination::Rails` option with the `will_paginate` helper, for example: 30 | 31 | ```ruby 32 | <%= will_paginate @collection, renderer: BootstrapPagination::Rails %> 33 | ``` 34 | 35 | ### Sinatra 36 | 37 | 1. Load the Bootstrap CSS in your template. 38 | 2. `require "will_paginate-bootstrap"` in your Sinatra app. 39 | 3. In your view, use the `renderer: BootstrapPagination::Sinatra` option with the `will_paginate` helper, for example: 40 | 41 | ```ruby 42 | <%= will_paginate @collection, renderer: BootstrapPagination::Sinatra %> 43 | ``` 44 | 45 | ## Compatibility 46 | 47 | Starting at version 1.0, this gem no longer supports Bootstrap 2. 48 | 49 |
Ruby | 52 |>= 1.9.2 | 53 |
---|---|
will_paginate | 56 |>= 3.0.3 | 57 |
Twitter Bootstrap | 60 |>= 3.0.0 | 61 |