Added an option to always display pagination #76

Closed
wants to merge 1 commit into
from

Projects

None yet
@koraktor

To increase consistency of page layouts – even if there's only one page – it is handy to display pagination always. I added an option called :show_always that can be used for that purpose.

Example:
<%= will_paginate @collection, :show_always => true %>

@hotsen

+1

@fweep

+1

UI requires disabled pagination controls even if there's only one page of data.

@elslooo

+1. This definitely needs to be added =)!

@koraktor

Sure, but it won't merge into master anymore. Will have a look at the new architecture soon.

@koraktor koraktor Added helper option :show_always
This option will force rendering the pagination even if there is
only one page to display.
fc98c7a
@koraktor

Ok, here we go.
Updated the code to be in line with master.

@mcrowe

@mislav This looks like a great fork. Any reason to not have it in master?

@huerlisi

I've run another rebase against @mislav's master. It's at huerlisi/will_paginate branch show_always.

@bshyong

+1

@punnie

+1

@mislav
Owner

Nope. If you want to display fake links that do nothing, feel free to use your own helper as fallback

<%= will_paginate(@posts) || fake_pagination %>
@mislav mislav closed this Jan 10, 2013
@keating

Maybe I can accept @mislav 's solution……

@punnie

Sure. It's not really a difficult problem to circumvent, but a question of coherence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment