bootstrap-ruby / will_paginate-bootstrap Goto Github PK
View Code? Open in Web Editor NEWIntegrates the Twitter Bootstrap pagination component with will_paginate
License: MIT License
Integrates the Twitter Bootstrap pagination component with will_paginate
License: MIT License
Deprecated by Integer on Ruby 2.4.0+
Bootstrap has different sizes for their pagiantor, can will_paginate-bootstrap take advantage of them?
<ul class="pagination pagination-lg">...</ul>
<ul class="pagination">...</ul>
<ul class="pagination pagination-sm">...</ul>
Hi.. I am using the following gems
gem 'will_paginate', '~> 3.0.6'
gem 'will_paginate-bootstrap'
:inner_window and outer_window properties doesnot showing me any changes in my page.. I have tried like,
my views,
<%= will_paginate @issue, page_links: true, inner_window: 2, outer_window: 1 %>
my controller,
@issue = Issue.all.paginate(page: params[:page], per_page: 5).order("issue_slip_no DESC")
..
How should I correct it?
Is there a way to introduce a disabled gap in the middle if there are many pages?
Even, though, Padrino is a superset of Sinatra, the gem is not working in it.
This example made it work: https://gist.github.com/phildionne/5785087
Hello, I got everthing to work locally, but when I push it to the production server, I get this error:
ActionView::Template::Error (uninitialized constant ActionView::CompiledTemplates::BootstrapPagination):
Do you know a possible solution?
I think I am missing something somewhere but for me the pagination class is not on the ul tag where bootstrap expects it to be. http://getbootstrap.com/components/#pagination
div class="pagination"
ul
and therefore does not get styled by bootstrap.
Currently when I access the site from mobile, pagination is not responsive - it shows up in two rows instead of a single row. Is it possible to make this responsive?
Thanks.
Hi!
I am the maintainer of three gems similar to this one that make it easier to use Twitter Bootstrap in Ruby projects (https://github.com/krautcomputing/rails-bootstrap-navbar, https://github.com/krautcomputing/bootstrap-navbar, https://github.com/krautcomputing/middleman-bootstrap-navbar).
I was thinking about moving all those gems to a separate organisation (like "bootstrap-ruby") and wanted to get some feedback from other maintainers of similar gems (and the community at large) if that makes sense and if we could use this to make it easier for people to find gems to work with Bootstrap in Ruby (Rails, Sinatra, etc.)
I think it would also invite other people to contribute to those projects if they were united in a central organisation.
What do you think?
Would you be willing to move this repo to such an organisation as well?
Works great! Very easy to integrate.
Is there a way I could center the pagination block with pagination-centered
?
I'm removing the page numbers, and adding a class of .pager
like this:
<%= will_paginate @posts,
renderer: BootstrapPagination::Rails,
page_links: false, class: :pager %>
However, because it's automatically adding the .pagination
class as well, I'm getting some funkiness.
I don't have a live example, but here's how it looks with first .pager .pagination
and second with just .pager
Thanks in advance :)
It would be awesome if your gem could support the additional sizes, to make the pagination links smaller or bigger.
Add .pagination-lg or .pagination-sm for those additional sizes
For no I use JS to add the additional class...
Cheers
Juergen
Hi,
Can anyone help me on how to use this gem with Mongoid.
Thanks in advance.
...so maybe there should be a 3 branch or something. There are a couple of changes: docs. As far as I can tell you just need to move the pagination
class to the ul
element.
Mathjax content that was loaded from pagination doesn't render properly until a refresh is done
Hi, i want to use other bootstarp pagination classes "pagination-lg" and "pagination-sm" rather than the default one. How can i do that?
Currently, from a screen reader perspective, the pages are not obviously labeled as such. Bootstrap 3.0 provides the 'sr-only' class to allow bits of html to only be shown to screen readers. The pages should really have a span which includes "Page " in front of them to make things easier on screen readers. The result for a screen reader list of links goes from "1", "2", "3 to "Page 1" "Page 2", "Page 3".
I used your existing renderer code for rails and made this addition and it seems to work fine. Perhaps in the gem this should be the default behavior with a will_paginate option to disable it?
I can do a pull request with the changes, if needed.
Is there any i18n support? If there is, pls document it! :)
RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']
Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.
There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!
Appendix:
If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies
p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.
Hi, are there any plans on supporting bootstrap 4?
lib/bootstrap_pagination/bootstrap_renderer.rb:11: warning: constant ::Fixnum is deprecated
Hi.
What I have:
ruby 1.9.3p125
rails (3.2.8)
twitter-bootstrap-rails (2.1.6)
will_paginate (3.0.3)
will_paginate-bootstrap (0.2.1)
In my view(haml): = will_paginate @articles, :renderer => BootstrapPagination::Rails
Everything works fine... but one thing makes me sad: current page don't have correct class name. Tag "li" has only word "class", instead of class="active". What am I doing wrong?
Thanx for your help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.