yrgoldteeth / bootstrap-will_paginate Goto Github PK
View Code? Open in Web Editor NEWFormat will_paginate html to match Twitter Bootstrap styling
License: MIT License
Format will_paginate html to match Twitter Bootstrap styling
License: MIT License
It seems the classes used by this gem conflict with the carousel classes. This can easily be reproduced by placing some pagination inside a carousel item. Bootstrap's carousel class also defines things like active, previous and next buttons.
I'm using bootstrap-will_paginate for all my layouts.
I also need not to use bootstrap-will_paginate for only one of my layouts, I want to use simply will_paginate.
Is it possible?
Hi, many thanks for the gem.
Is it possible to update the Alignment (Bootstrap 4 only) example? The class d-flex is required in order to make it working.
<%= will_paginate(@things, :renderer => WillPaginate::ActionView::Bootstrap4LinkRenderer, class: 'd-flex justify-content-center') %>
Mauro
Although, Bootstrap 4 is in alpha right now but I would like to see some support for the newest framework when it comes out in beta. It looks pretty sick. What do you guys think?
As documented in O-I/pluck#10 and Casecommons/pg_search#167, there is an issue with will_paginate using the old .count()
syntax.
Nazgum has made a branch that seems to have fixed will_paginate at https://github.com/nazgum/will_paginate.git
any chance this could be pulled in?
I've never done a pull request before but would be able to spare some time if you could give me instructions.
Thanks
I'm getting the following html output:
<div class="pagination">
<ul class="pagination">
<li class="prev previous_page disabled"><a href="#">«</a></li>
...
<li class="next next_page "><a rel="next" href="/users?page=2">»</a></li>
</ul>
</div>
but with bootstrap 3 this is causing a huge gap around the pagination because of the nested elements with the pagination
class applied so they are both getting a 20px top and bottom margin.
Is this supposed to happen?
Thanks
Col
Using Rails 5.1.2 and will_paginate 3.1.6 it seems that even when a user is on the last/first page of the dataset, next and previous links are still clickable and generate an ajax request(using turbolinks).
Next
may look to be disabled but the ajax request goes through nonetheless.
This is a look at Chrome inspector.
Is this behavior intentional?
EDIT: I've found a workaround to get the behavior I want by setting the following in my css:
.disabled {
pointer-events: none;
}
but it's probably not the proper way to do it.
Related to: mislav/will_paginate#551
Any better ideas?
Is there a way to support .pagination-sm
or .pagination-lg
?
Bootstrap Ref: http://getbootstrap.com/components/#sizing
Thanks
rails server
/home/andey/.rvm/gems/ruby-2.0.0-p247/gems/leshill-will_paginate-2.3.11/lib/will_paginate.rb:78:in `extend': wrong argument type Class (expected Module) (TypeError)
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/leshill-will_paginate-2.3.11/lib/will_paginate.rb:78:in `<module:Deprecation>'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/leshill-will_paginate-2.3.11/lib/will_paginate.rb:77:in `<module:WillPaginate>'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/leshill-will_paginate-2.3.11/lib/will_paginate.rb:11:in `<top (required)>'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/andey/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/andey/Dropbox/Projects/bestofama/config/application.rb:6:in `<top (required)>'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/andey/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
the gem 'will_paginate' itself has no complications with mongoid.
I think I will match the gem version number of this to the version number of Twitter Bootstrap, and keep the Rubygems version matched to the current public release of Bootstrap.
Hope to have time to work on this soon.
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?
Like in title: Would be nice to have a screenshot in Readme.md. If I find some time to do that, I will create a pull request.
I'm using Rails 3.2.1. Not sure what is causing the error undefined method 'paginate' for #<Class:0x007fd95430ddf8>
. Restarted the server, rechecked everything, still not working.
Mind shipping the v3 version as a gem?
I get the error undefined method 'total_pages' for nil:NilClass
when leaving off an explicit argument to will_paginate
. In other words, if @users
contains a (paginated) list of users on the Users index page, the code
<%= will_paginate(@users) %>
works fine, but the equivalent code
<%= will_paginate %>
raises the error above.
I'm considering bootstrap-will_paginate
for inclusion in the Ruby on Rails Tutorial, 2nd Edition, so it would be awesome if you could fix this issue, for the sake of newbies everywhere.
You how to configure the plugin has the error on :renderer => WillPaginate::ActionView::LinkRenderer
As Rails 3 and will_paginate 3.0.4 the correct syntax is:
WillPaginate::ActionView::BootstrapLinkRenderer
Thanks for your plugin.
Seems like the install directions are incomplete.
... nothing ...
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.