]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block title %} | |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | |
5 | ||
6 | {% if currentRoute == 'starred' %} | |
7 | {% trans %}Starred{% endtrans %} | |
8 | {% elseif currentRoute == 'archive' %} | |
9 | {% trans %}Archive{% endtrans %} | |
10 | {% else %} | |
11 | {% trans %}Unread{% endtrans %} | |
12 | {% endif %} | |
13 | ||
14 | {% endblock %} | |
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> | |
21 | <ul class="pagination right"> | |
22 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} | |
23 | <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> | |
24 | <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a> | |
25 | </li> | |
26 | {% endfor %} | |
27 | </div> | |
28 | </div> | |
29 | {% endif %} | |
30 | {% endblock %} | |
31 | <br> | |
32 | {% if entries is empty %} | |
33 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | |
34 | {% else %} | |
35 | <ul class="row data"> | |
36 | {% for entry in entries %} | |
37 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | |
38 | <div class="card"> | |
39 | <div class="card-content"> | |
40 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | |
41 | {% if entry.readingTime > 0 %} | |
42 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div> | |
43 | {% else %} | |
44 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | |
45 | {% endif %} | |
46 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | |
47 | </div> | |
48 | <div class="card-action"> | |
49 | <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> | |
50 | ||
51 | <ul class="tools links right"> | |
52 | <li> | |
53 | <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> | |
54 | <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> | |
55 | <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | |
56 | </li> | |
57 | </ul> | |
58 | </div> | |
59 | </div> | |
60 | </li> | |
61 | {% endfor %} | |
62 | </ul> | |
63 | {% endif %} | |
64 | ||
65 | ||
66 | <!-- Filters --> | |
67 | <div id="filters" class="side-nav fixed right-aligned"> | |
68 | <form> | |
69 | ||
70 | <h4 class="center">{% trans %}Filters{% endtrans %}</h1> | |
71 | ||
72 | <div class="row"> | |
73 | ||
74 | <div class="col s12"> | |
75 | <label>{% trans %}Reading time in minutes{% endtrans %}</label> | |
76 | </div> | |
77 | ||
78 | <div class="input-field col s6"> | |
79 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
80 | <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label> | |
81 | </div> | |
82 | ||
83 | <div class="input-field col s6"> | |
84 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
85 | <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label> | |
86 | </div> | |
87 | ||
88 | <div class="col s6"> | |
89 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clean_form_filters">{% trans %}Clean{% endtrans %}</a> | |
90 | </div> | |
91 | ||
92 | <div class="col s6"> | |
93 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button> | |
94 | </div> | |
95 | ||
96 | </div> | |
97 | ||
98 | </form> | |
99 | </div> | |
100 | {% endblock %} |