Merge pull request #1328 from wallabag/v2-fix-1324

fix #1324: do not display pagination when only 1 page
This commit is contained in:
Jeremy Benoist 2015-08-12 14:12:08 +02:00
commit d990dc6f05
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@
<div class="results">
<div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
<div class="pagination">
{% for p in range(1, entries.nbPages) %}
{% 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>
</li>

View file

@ -20,7 +20,7 @@
<div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
<div class="left"><form>{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div>
<ul class="pagination right">
{% for p in range(1, entries.nbPages) %}
{% 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>
</li>