Coder Social home page Coder Social logo

bootstrap-kaminari-views's Introduction

Bootstrap Kaminari Views

<img src=“https://badge.fury.io/rb/bootstrap-kaminari-views.svg” alt=“Gem Version” />

Basic Gem for quick default inclusion of Kaminari theme compatible with Twitter Bootstrap 2.0 and Twitter Bootstrap 3.0

Usage

Ensure your gemfile contains

gem 'kaminari'
gem 'bootstrap-kaminari-views'

Render Pagination with a theme

= paginate @posts, :theme => 'twitter-bootstrap'

= paginate @posts, :theme => 'twitter-bootstrap-3'

Render with specific pagination classes

= paginate @posts, :theme => 'twitter-bootstrap-3',
                   :pagination_class => "pagination-sm"

Render with specific pagination classes

= paginate @posts, :theme => 'twitter-bootstrap',
                   :pagination_class => "pagination-small pagination-centered"

Default Options

If you want to use one or more options as the default across your app, you can override the helper method in your application_helper.rb file:

module ApplicationHelper

  def paginate objects, options = {}
    options.reverse_merge!( theme: 'twitter-bootstrap' )

    super( objects, options )
  end

end

Credits

Kaminari - For making an awesome gem

twitter-bootstrap-kaminari-views - Non Gemified Implementation

bootstrap-kaminari-views's People

Contributors

barockok avatar jharbert avatar joshuapinter avatar matenia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.