]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
Merge pull request #1312 from wallabag/v2-fix-1311
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / Entry / entries.html.twig
index acb964205428bc78cf7160056b4fc44a63268b83..7629ef35e646e86786dcf4fe20c9cc8cf236198f 100644 (file)
@@ -8,9 +8,9 @@
         <div class="results">
             <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
             <div class="pagination">
-                {% for p in range(1, entries.count) %}
+                {% for p in range(1, entries.nbPages) %}
                     <li>
-                        <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}">{{ p }}</a>
+                        <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
                     </li>
                 {% endfor %}
             </div>
     {% if entries is empty %}
         <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
     {% else %}
+        <div><form>{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div>
         {% for entry in entries %}
-            <div id="entry-{{ entry.id|e }}" class="entrie">
+            <div id="entry-{{ entry.id|e }}" class="entry">
                 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
-                {% if entry.content| readingTime > 0 %}
-                    <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min</span></div>
+                {% if entry.readingTime > 0 %}
+                    <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min</span></div>
                 {% else %}
                     <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
                 {% endif %}