]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Merge pull request #2216 from Rurik19/master
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
index f718043b05ffedc383c99011b4177ff558019a09..778625ae0338742cc32ebf955c36903ea1643e06 100644 (file)
@@ -3,39 +3,22 @@
 {% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %}
 
 {% block content %}
-    {% block pager %}
-        <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>
-        </div>
-    {% endblock %}
+    {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %}
 
     {% 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>
                     {{ form_label(form.isStarred) }}
                 </div>
 
+                <div class="input-field">
+                    {{ form_widget(form.isUnread) }}
+                    {{ form_label(form.isUnread) }}
+                </div>
+
                 <div class="input-field">
                     {{ form_widget(form.previewPicture) }}
                     {{ form_label(form.previewPicture) }}
         </form>
     </aside>
 
+    {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %}
 {% endblock %}