Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to hide pagination for single page result #86

Merged
merged 2 commits into from
Jun 12, 2019
Merged

Add option to hide pagination for single page result #86

merged 2 commits into from
Jun 12, 2019

Conversation

shulhi
Copy link
Contributor

@shulhi shulhi commented Mar 12, 2019

I need to hide pagination when total pages are one/zero. There is also related issue here, #75.

This PR adds a global option with key hide_single or you can set it as an option in pagination_links function i.e. pagination_links(conn, page, hide_single: true). (also open to change the option to a different name, can't think of a better name at the moment).

All tests are passing. Let me know if this is something you like or don't like. I'm okay with either decision. I can definitely hide the pagination in the template, but it's probably convenient to have it as an option.

@shulhi
Copy link
Contributor Author

shulhi commented Mar 12, 2019

Tests are failing. I'll fix them.

lib/scrivener/html.ex Outdated Show resolved Hide resolved
@mgwidmann
Copy link
Owner

I'd like to merge after the documentation is additionally updated.

@shulhi
Copy link
Contributor Author

shulhi commented May 1, 2019

I'll try to resolve this within a day or two.

@shulhi
Copy link
Contributor Author

shulhi commented May 2, 2019

@mgwidmann I think I fixed them based on the feedback.

@mgwidmann mgwidmann merged commit ec9283a into mgwidmann:master Jun 12, 2019
@shulhi shulhi deleted the hide-single-page branch June 12, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants