]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Improve pagination when user has lot of entries
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
index 29cb9584528c719ba513edcdedf2b40bf50cb3dc..8114c703c630233d447c95cd88c71c7280677691 100644 (file)
@@ -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 %}