scrivener_html icon indicating copy to clipboard operation
scrivener_html copied to clipboard

Altering the order of first/previous and last/next

Open JohnKacz opened this issue 6 years ago • 5 comments

If I wanted to do something like this

<%= pagination_links @conn, @page, distance: 2, first: "<<", previous: "<", next: ">", last: ">>", ellipsis: false %>

it would generate

< << 5 6 7 8 9 >> >

but I would want to generate

<< < 5 6 7 8 9 > >>

Another enhancement that I don't think is currently possible is always showing the previous/next buttons but mark them as disabled if on the first/last page respectively.

JohnKacz avatar Feb 04 '19 20:02 JohnKacz

Ah hmmm yeah, thats not configurable. How would you suggest making that configurable? I'm not sure if we should introduce an order tuple or not, something like {:previous, :first, :pages, :last, :next}?

mgwidmann avatar Feb 12 '19 03:02 mgwidmann

What about a param something like <%= pagination_links @page, distance: 1, edge: "outside" %> meaning that the "edge" page elements (first and last) would be forced to the outside positions as requested above. Default would be edge: "inside".

mendomedia avatar Jun 28 '19 05:06 mendomedia

I'm not sure that edge is quite clear enough. I'd like something more descriptive but theres nothing that immediately jumps to my mind...

mgwidmann avatar Jul 19 '19 03:07 mgwidmann

boundary or border?

JohnKacz avatar Jul 19 '19 18:07 JohnKacz

I think something like first_last_links: :outside or first_last_links: :inside would be ok. Thats clear and self-explanatory.

Though I still don't see why an order tuple wouldn't also work.

mgwidmann avatar Jul 22 '19 04:07 mgwidmann