]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Merge pull request #1938 from wallabag/hide-pagination
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
index f718043b05ffedc383c99011b4177ff558019a09..c093edcb4fbd11c80300924996eb4742c51b71d5 100644 (file)
@@ -6,15 +6,10 @@
     {% block pager %}
         <div class="results">
             <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>
-                {% 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 %}
+                {% if entries.getNbPages > 1 %}
+                    {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
                 {% endif %}
             </div>
         </div>
 
     {% for entry in entries %}
         <div id="entry-{{ entry.id|e }}" class="entry">
-            <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
-            {% if entry.readingTime > 0 %}
-                <div class="estimatedTime">
+            <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
+
+            {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
+            <div class="estimatedTime">
                     <span class="tool reading-time">
-                        {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}
-                    </span>
-                </div>
+            {% if readingTime > 0 %}
+                {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
             {% else %}
-                <div class="estimatedTime">
-                    <span class="tool reading-time">
-                    {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
-                    </span>
-                </div>
+                {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
             {% endif %}
+                    </span>
+            </div>
 
             <ul class="tools links">
                 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>