Hide pagination if we only have one entry to display

This commit is contained in:
Nicolas Lœuillet 2016-04-16 07:19:30 +02:00
parent d1f4996b77
commit 1f034a3316
No known key found for this signature in database
GPG Key ID: 5656BE27E1E34D0A
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,9 @@
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> <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> <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} {% if entries.count > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -21,7 +21,9 @@
<div class="nb-results left"> <div class="nb-results left">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
</div> </div>
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} {% if entries.count > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div> </div>
{% endblock %} {% endblock %}
<br /> <br />