Merge pull request #1352 from wallabag/v2-fix-pagination

fix #1350: fix pagination with filters
This commit is contained in:
Jeremy Benoist
2015-08-17 15:19:35 +02:00
3 changed files with 24 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<div class="pagination">
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
<li>
<a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
</li>
{% endfor %}
</div>

View File

@ -22,7 +22,7 @@
<ul class="pagination right">
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
<li class="{{ currentPage == p ? 'active':'waves-effect'}}">
<a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a>
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
</li>
{% endfor %}
</div>