]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/WallabagBundle/Resources/views/Entry/entries.html.twig
article view, fav list, archive list
[github/wallabag/wallabag.git] / src / WallabagBundle / Resources / views / Entry / entries.html.twig
index f4d7a7ab8af4545bb64a92b34cfd794ce40249b5..8117729801d6c105c60d07dd64e7c91ac2da1497 100644 (file)
@@ -2,25 +2,32 @@
 
 {% block title "Unread" %}
 
-{% block content_header '' %}
+{% block menu %}
+    {% include "WallabagBundle::_menu.html.twig" %}
+{% endblock %}
 
 {% block content %}
-    {% for entry in entries %}
-        <div id="entry-{{ entry.id|e }}" class="entrie">
-            <h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ 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>
-            {% else %}
-                <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
-            {% endif %}
 
-            <ul class="tools links">
-                <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
-                <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li>
-                <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="./?action=delete&amp;id={{ entry.id|e }}"><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>
-            </ul>
-            <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
-        </div>
-    {% endfor %}
+    {% if entries is empty %}
+        <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
+    {% else %}
+        {% for entry in entries %}
+            <div id="entry-{{ entry.id|e }}" class="entrie">
+                <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>
+                {% else %}
+                    <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
+                {% endif %}
+
+                <ul class="tools links">
+                    <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
+                    <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li>
+                    <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="./?action=delete&amp;id={{ entry.id|e }}"><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>
+                </ul>
+                <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
+            </div>
+        {% endfor %}
+    {% endif %}
 {% endblock %}