scrivener_html
scrivener_html copied to clipboard
Altering the order of first/previous and last/next
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.
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}?
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".
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...
boundary or border?
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.