]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block title "Unread" %} | |
4 | ||
5 | {% block content %} | |
6 | {% block pager %} | |
7 | <div class="results"> | |
8 | <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div> | |
9 | <div class="pagination"> | |
10 | <a href="#" id="filter">{% trans %}Filter{% endtrans %}</a> | |
11 | {% if entries is not empty %} | |
12 | – | |
13 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} | |
14 | <li> | |
15 | <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a> | |
16 | </li> | |
17 | {% endfor %} | |
18 | {% endif %} | |
19 | </div> | |
20 | </div> | |
21 | {% endblock %} | |
22 | ||
23 | {% if entries is empty %} | |
24 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | |
25 | {% else %} | |
26 | {% for entry in entries %} | |
27 | <div id="entry-{{ entry.id|e }}" class="entry"> | |
28 | <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> | |
29 | {% if entry.readingTime > 0 %} | |
30 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min</span></div> | |
31 | {% else %} | |
32 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | |
33 | {% endif %} | |
34 | ||
35 | <ul class="tools links"> | |
36 | <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> | |
37 | <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> | |
38 | <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> | |
39 | <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> | |
40 | </ul> | |
41 | {% if entry.previewPicture is null %} | |
42 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | |
43 | {% else %} | |
44 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> | |
45 | {% endif %} | |
46 | </div> | |
47 | {% endfor %} | |
48 | {% endif %} | |
49 | ||
50 | <aside id="filter-form" class=""> | |
51 | <form method="get" action="{{ path('all') }}"> | |
52 | <h2>{% trans %}Filters{% endtrans %}</h2> | |
53 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | |
54 | ||
55 | <div id="filter-status" class="filter-group"> | |
56 | <div class=""> | |
57 | <label>{% trans %}Status{% endtrans %}</label> | |
58 | </div> | |
59 | <div class="input-field"> | |
60 | {{ form_widget(form.isArchived) }} | |
61 | <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label> | |
62 | </div> | |
63 | ||
64 | <div class="input-field"> | |
65 | {{ form_widget(form.isStarred) }} | |
66 | <label for="entry_filter_isStarred">{% trans %}Starred{% endtrans %}</label> | |
67 | </div> | |
68 | </div> | |
69 | <div id="filter-reading-time" class="filter-group"> | |
70 | <div class=""> | |
71 | <label>{% trans %}Reading time in minutes{% endtrans %}</label> | |
72 | </div> | |
73 | <div class="input-field "> | |
74 | <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label> | |
75 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
76 | </div> | |
77 | <div class="input-field "> | |
78 | <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label> | |
79 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
80 | </div> | |
81 | </div> | |
82 | ||
83 | <div id="filter-domain-name" class="filter-group"> | |
84 | <label for="entry_filter_domainName">{% trans %}Domain name{% endtrans %}</label> | |
85 | <div class="input-field "> | |
86 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
87 | </div> | |
88 | </div> | |
89 | ||
90 | <div id="filter-creation-date" class="filter-group"> | |
91 | <div class=""> | |
92 | <label>{% trans %}Creation date{% endtrans %}</label> | |
93 | </div> | |
94 | <div class="input-field "> | |
95 | <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label> | |
96 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
97 | </div> | |
98 | <div class="input-field "> | |
99 | <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label> | |
100 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
101 | </div> | |
102 | </div> | |
103 | <div id="filter-buttons" class="filter-group"> | |
104 | ||
105 | <div class=""> | |
106 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a> | |
107 | </div> | |
108 | ||
109 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filters{% endtrans %}</button> | |
110 | ||
111 | </div> | |
112 | </form> | |
113 | </aside> | |
114 | ||
115 | {% endblock %} |