
Cascading Stylesheets Compatibility with will_paginate
Reported by jana4u | October 15th, 2008 @ 01:21 PM
It would be fine to have same styles for both paginations. This would ease usage of both plugins/gems together in one application.
will_paginate is wide spread and already has nice built-in pagination styles. To make theese styles accessible for Searchgasm, it would require only small changes in classes added to pagination anchors and spans.
Maybe it could be new option in configuration - something like this:
Searchgasm::Config.configure do |config|
config.will_paginate_compatiblity = true
end
Or all classes could be parametrized - that would be much more flexible.
Comments and changes to this ticket
-
Ben Johnson October 15th, 2008 @ 01:25 PM
- State changed from new to open
I have not used will_paginate extensively, but making this change should be pretty simple. If you can outline the changes for me, I'll get it implemented. That is, what are the class names for will_paginate.
-
Ben Johnson October 15th, 2008 @ 02:52 PM
Cool, this should be easy enough. I'll have it added soon.
-
Ben Johnson October 16th, 2008 @ 04:12 PM
Just to update, I am on vacation and will return on Monday. I plan to have this implemented by then. Sorry for the delay.
-
Georg Ledermann October 16th, 2008 @ 04:20 PM
Have a good rest, your work on Searchgasm is most appreciated!
-
Ben Johnson October 20th, 2008 @ 09:51 PM
- State changed from open to resolved
This is all set. I had to change configuration a little bit, it was getting out of hand and since I am anal I wanted it to be organized. Since it breaks backwards compatibility I increased the version. But you can do this now:
Searchgasm::Config.configure do |config| config.helpers.page_links_first_page_class_name = "first_page" config.helpers.page_links_last_page_class_name = "last_page" config.helpers.page_links_next_page_class_name = "next_page" config.helpers.page_links_prev_page_class_name = "prev_page" config.helpers.page_links_prev_page_class_name = "current_page" config.helpers.page_links_prev_page_class_name = "disabled_page" end
Check out the doc for more info. But you can change any class name you want now. I also modified how some other options work as well. Let me know if you have any problems.
-
Ben Johnson November 17th, 2008 @ 04:33 PM
Thought Id update this. I added:
config.helpers.page_links_act_like_will_paginate = true
Hopefully this makes switching from will_paginate easier.
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Provides common named scopes and object based searching.