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

Improve pagination when user has lot of entries #1918

Merged
merged 6 commits into from Apr 13, 2016
Merged

Conversation

nicosomb
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Documentation no
Translation no
Fixed tickets #1905
License MIT

Fix #1905

Usage of https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle

capture d ecran 2016-04-12 a 15 46 20

TODO

  • CSS : when we are on page 1, Previous link is too near to the pages.
  • translation for Next / Previous links

Fix #1905
* Usage of whiteoctober/WhiteOctoberPagerfantaBundle
@nicosomb nicosomb added this to the 2.0.2 milestone Apr 12, 2016
if ($page > 1) {
return $this->redirect($this->generateUrl($type, array('page' => $entries->getNbPages())), 302);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you have to define it right? Because I guess that by default, the bundle doesn't redirect to the latest page?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.

I thought that our previous behavior was to avoid an Exception. But no, it was really to redirect (#1551).
Will fix that.

@@ -7,16 +7,9 @@
<div class="results">
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is wrong here

@j0k3r
Copy link
Member

j0k3r commented Apr 13, 2016

It's really sad that pagerfanta (the lib not the bundle) didn't get any update since 2014 😞

@nicosomb
Copy link
Member Author

@j0k3r see https://twitter.com/WhiteOctober/status/720153952222846976

@j0k3r j0k3r merged commit a417b86 into v2 Apr 13, 2016
@j0k3r j0k3r deleted the improve-pagination branch April 13, 2016 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants