]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
store domainName in database
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / Entry / entries.html.twig
index dfce4b3ce67db728698428f7fb232bbee6ba2a59..539c035fa65f7e1d2b8f14e8c0d90ae3a0b3d07e 100644 (file)
@@ -2,19 +2,15 @@
 
 {% block title "Unread" %}
 
-{% block menu %}
-    {% include "WallabagCoreBundle::_menu.html.twig" %}
-{% endblock %}
-
 {% block content %}
     {% block pager %}
     {% if entries is not empty %}
         <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) if entries.nbPages > 1 %}
                     <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 %}
@@ -38,7 +35,7 @@
                     <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
                     <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li>
                     <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li>
-                    <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | domainName }}</span></a></li>
+                    <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName }}</span></a></li>
                 </ul>
                 <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
             </div>