]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
b1a65df9 NL |
3 | {% block title %} |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | |
5 | ||
308db016 | 6 | {% if currentRoute == 'starred' %} |
b1a65df9 NL |
7 | {% trans %}Starred{% endtrans %} |
8 | {% elseif currentRoute == 'archive' %} | |
9 | {% trans %}Archive{% endtrans %} | |
308db016 NL |
10 | {% else %} |
11 | {% trans %}Unread{% endtrans %} | |
b1a65df9 NL |
12 | {% endif %} |
13 | ||
14 | {% endblock %} | |
53e12188 AD |
15 | |
16 | {% block content %} | |
17 | {% block pager %} | |
18 | {% if entries is not empty %} | |
19 | <div class="results clearfix"> | |
20 | <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div> | |
26864574 | 21 | <div class="left"><form>{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div> |
53e12188 | 22 | <ul class="pagination right"> |
2ac2e0bc | 23 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} |
53e12188 AD |
24 | <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> |
25 | <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a> | |
26 | </li> | |
27 | {% endfor %} | |
28 | </div> | |
29 | </div> | |
30 | {% endif %} | |
31 | {% endblock %} | |
32 | <br> | |
33 | {% if entries is empty %} | |
34 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | |
35 | {% else %} | |
b17874a7 | 36 | <ul class="row data"> |
53e12188 AD |
37 | {% for entry in entries %} |
38 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | |
39 | <div class="card"> | |
40 | <div class="card-content"> | |
41 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | |
26864574 NL |
42 | {% if entry.readingTime > 0 %} |
43 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div> | |
53e12188 AD |
44 | {% else %} |
45 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | |
46 | {% endif %} | |
47 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | |
48 | </div> | |
49 | <div class="card-action"> | |
c2257428 | 50 | <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.domainName }}</span></a></bold> |
53e12188 AD |
51 | |
52 | <ul class="tools links right"> | |
53 | <li> | |
54 | <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a> | |
55 | <a title="{% trans %}toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a> | |
56 | <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | |
57 | </li> | |
58 | </ul> | |
59 | </div> | |
60 | </div> | |
61 | </li> | |
62 | {% endfor %} | |
63 | </ul> | |
64 | {% endif %} | |
65 | {% endblock %} |