forked from wallabag/wallabag
Merge pull request #1918 from wallabag/improve-pagination
Improve pagination when user has lot of entries
This commit is contained in:
@ -6,16 +6,9 @@
|
||||
{% block pager %}
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
|
||||
<div class="pagination">
|
||||
<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 %}
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
|
||||
</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, 'twitter_bootstrap_translated', {'proximity': 1}) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user