aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-12 14:12:08 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-12 14:12:08 +0200
commitd990dc6f0535cad745929ca90d1e4bb00ba47584 (patch)
treece876e1bef46cdc10c8b86f7cb7fdfd380941090
parent1a0ea1f35adaef86580f6141943a110453372bcf (diff)
parentbdf39ff10ded31ea9c09b6510013f84245d72630 (diff)
downloadwallabag-d990dc6f0535cad745929ca90d1e4bb00ba47584.tar.gz
wallabag-d990dc6f0535cad745929ca90d1e4bb00ba47584.tar.zst
wallabag-d990dc6f0535cad745929ca90d1e4bb00ba47584.zip
Merge pull request #1328 from wallabag/v2-fix-1324
fix #1324: do not display pagination when only 1 page
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
index 7629ef35..ea4a9976 100644
--- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
@@ -8,7 +8,7 @@
8 <div class="results"> 8 <div class="results">
9 <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div> 9 <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
10 <div class="pagination"> 10 <div class="pagination">
11 {% for p in range(1, entries.nbPages) %} 11 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
12 <li> 12 <li>
13 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a> 13 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
14 </li> 14 </li>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index b9f1be49..55e3540d 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -20,7 +20,7 @@
20 <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div> 20 <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
21 <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> 21 <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>
22 <ul class="pagination right"> 22 <ul class="pagination right">
23 {% for p in range(1, entries.nbPages) %} 23 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
24 <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> 24 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
25 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a> 25 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a>
26 </li> 26 </li>