wallabag/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig

45 lines
2.9 KiB
Twig
Raw Normal View History

{% extends "WallabagCoreBundle::layout.html.twig" %}
2015-01-22 16:18:56 +00:00
{% block title "Unread" %}
{% block content %}
2015-01-23 11:45:24 +00:00
{% 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.nbPages) if entries.nbPages > 1 %}
2015-01-23 11:45:24 +00:00
<li>
2015-08-17 13:15:51 +00:00
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
2015-01-23 11:45:24 +00:00
</li>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}
2015-01-22 16:18:56 +00:00
2015-01-22 20:11:22 +00:00
{% if entries is empty %}
<div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
{% else %}
<div><form action="{{ path('all') }}">{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div>
2015-01-22 20:11:22 +00:00
{% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entry">
2015-01-22 20:11:22 +00:00
<h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
{% if entry.readingTime > 0 %}
<div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min</span></div>
2015-01-22 20:11:22 +00:00
{% 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">
2015-02-05 21:33:36 +00:00
<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>
2015-01-23 11:45:24 +00:00
<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>
2015-08-12 19:16:00 +00:00
<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>
2015-01-22 20:11:22 +00:00
</ul>
<p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
2015-01-22 20:11:22 +00:00
</div>
{% endfor %}
{% endif %}
2015-01-22 16:18:56 +00:00
{% endblock %}