forked from wallabag/wallabag
Improve pagination when user has lot of entries
Fix #1905 * Usage of whiteoctober/WhiteOctoberPagerfantaBundle
This commit is contained in:
@ -7,16 +7,9 @@
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
|
||||
<div class="pagination">
|
||||
<a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
|
||||
{% if entries is not empty %}
|
||||
–
|
||||
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
|
||||
<li>
|
||||
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
|
||||
{{ pagerfanta(entries, 'wallabag_view') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -21,13 +21,7 @@
|
||||
<div class="nb-results left">
|
||||
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
|
||||
</div>
|
||||
<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'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ pagerfanta(entries, 'wallabag_view') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user