Skip to content

Commit

Permalink
bug #780 Fix deleting the last entity redirected to page -1 (ogizanagi)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Fix deleting the last entity redirected to page -1

Should fix https://github.com/javiereguiluz/EasyAdminBundle/issues/775#issuecomment-169804746

Commits
-------

840546d Fix deleting the last entity redirected to page -1
  • Loading branch information
javiereguiluz committed Jan 8, 2016
2 parents fd994f2 + 840546d commit 6a0ebb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/default/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
</div>

{% block delete_form %}
{% set referer = paginator.currentPage == paginator.nbPages and 0 != paginator.currentPage and 1 == paginator.currentPageResults.count
{% set referer = paginator.currentPage == paginator.nbPages and 1 != paginator.currentPage and 1 == paginator.currentPageResults.count
? path('easyadmin', app.request.query|merge({ page: app.request.query.get('page') - 1 }))
: app.request.requestUri
%}
Expand Down

0 comments on commit 6a0ebb1

Please sign in to comment.