]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
bd40f1af TC |
3 | {% block head %} |
4 | {{ parent() }} | |
531c8d0a TC |
5 | {% if tag is defined and app.user.config.feedToken %} |
6 | <link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" /> | |
bd40f1af TC |
7 | {% endif %} |
8 | {% endblock %} | |
9 | ||
b1a65df9 | 10 | {% block title %} |
ee122a75 | 11 | {% set filter = '' %} |
73e8df9e | 12 | {% if tag is defined %} |
bd40f1af | 13 | {% set filter = tag.slug %} |
73e8df9e | 14 | {% endif %} |
398de405 | 15 | {% if searchTerm is defined and searchTerm is not empty %} |
ee122a75 NL |
16 | {% set filter = searchTerm %} |
17 | {% endif %} | |
18 | {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %} | |
b1a65df9 | 19 | {% endblock %} |
53e12188 AD |
20 | |
21 | {% block content %} | |
9aa99128 | 22 | {% set listMode = app.user.config.listMode %} |
bd40f1af | 23 | {% set currentRoute = app.request.attributes.get('_route') %} |
09ef25c3 NL |
24 | {% if currentRoute == 'homepage' %} |
25 | {% set currentRoute = 'unread' %} | |
26 | {% endif %} | |
46732777 | 27 | <form name="form_mass_action" action="{{ path('mass_action') }}" method="post"> |
f836b98f S |
28 | <div class="results"> |
29 | <div class="nb-results"> | |
817724a7 | 30 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} |
9aa99128 | 31 | <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a> |
531c8d0a TC |
32 | {% if app.user.config.feedToken %} |
33 | {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %} | |
bd40f1af | 34 | {% endif %} |
817724a7 JB |
35 | </div> |
36 | {% if entries.getNbPages > 1 %} | |
37 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
38 | {% endif %} | |
39 | </div> | |
40 | ||
812c980f | 41 | <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}"> |
46732777 NL |
42 | |
43 | <li class="mass-buttons"> | |
44 | {% if entries.count > 0 and listMode == 1 %} | |
45 | <span> | |
46 | <input id="selectAll" type="checkbox" data-toggle="[data-js='entry-checkbox']" data-js="checkboxes-toggle" /> | |
47 | </span> | |
48 | ||
49 | <span> | |
50 | <button class="btn cyan darken-1" type="submit" name="toggle-read" title="{{ 'entry.list.toogle_as_read'|trans }}"><i class="material-icons">done</i></button> | |
51 | <button class="btn cyan darken-1" type="submit" name="toggle-star" title="{{ 'entry.list.toogle_as_star'|trans }}" ><i class="material-icons">star</i></button> | |
e247450a | 52 | <button class="btn cyan darken-1" type="submit" name="delete" onclick="return confirm('{{ 'entry.confirm.delete_entries'|trans|escape('js') }}')" title="{{ 'entry.list.delete'|trans }}"><i class="material-icons">delete</i></button> |
46732777 NL |
53 | </span> |
54 | {% endif %} | |
55 | </li> | |
56 | ||
428af5a8 | 57 | {% for entry in entries %} |
ef81e3c8 | 58 | <li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12"> |
9aa99128 | 59 | {% if listMode == 1 %} |
9f01d0fd | 60 | {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} |
8d7b4f0e JB |
61 | {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} |
62 | {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} | |
cefbe6a8 | 63 | {% else %} |
8d7b4f0e JB |
64 | {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} |
65 | {% endif %} | |
428af5a8 NL |
66 | </li> |
67 | {% endfor %} | |
68 | </ul> | |
46732777 | 69 | </form> |
392f4a26 | 70 | |
817724a7 | 71 | {% if entries.getNbPages > 1 %} |
f836b98f S |
72 | <div class="results"> |
73 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
74 | </div> | |
817724a7 JB |
75 | {% endif %} |
76 | ||
03690d13 | 77 | <!-- Export --> |
64f81bc3 | 78 | <div id="export" class="side-nav right-aligned"> |
bde23a44 | 79 | {% set currentTag = null %} |
920d8859 | 80 | {% if tag is defined %} |
bd40f1af | 81 | {% set currentTag = tag.slug %} |
03690d13 | 82 | {% endif %} |
93c5b47e KD |
83 | {% set exportSearchTerm = null %} |
84 | {% if searchTerm is defined %} | |
85 | {% set exportSearchTerm = searchTerm %} | |
86 | {% endif %} | |
87 | {% set previousRoute = app.request.attributes.get('currentRoute') %} | |
0d42217e | 88 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> |
03690d13 | 89 | <ul> |
93c5b47e KD |
90 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">EPUB</a></li>{% endif %} |
91 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">MOBI</a></li>{% endif %} | |
92 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">PDF</a></li>{% endif %} | |
93 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">JSON</a></li>{% endif %} | |
94 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">CSV</a></li>{% endif %} | |
95 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">TXT</a></li>{% endif %} | |
96 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml', 'tag' : currentTag, 'search_entry[term]' : exportSearchTerm, 'currentRoute' : previousRoute }) }}">XML</a></li>{% endif %} | |
03690d13 TC |
97 | </ul> |
98 | </div> | |
99 | ||
392f4a26 | 100 | <!-- Filters --> |
891456ba | 101 | {% if form is not null %} |
64f81bc3 | 102 | <div id="filters" class="side-nav right-aligned"> |
89659c9e | 103 | <form action="{{ path('all') }}"> |
392f4a26 | 104 | |
0d42217e | 105 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> |
392f4a26 AD |
106 | |
107 | <div class="row"> | |
d8e961bd LD |
108 | {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %} |
109 | <div class="col s12 center-align"> | |
110 | <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a> | |
111 | </div> | |
112 | {% endif %} | |
113 | ||
db96045a | 114 | <div class="col s12"> |
0d42217e | 115 | <label>{{ 'entry.filters.status_label'|trans }}</label> |
db96045a JB |
116 | </div> |
117 | ||
118 | <div class="input-field col s6 with-checkbox"> | |
119 | {{ form_widget(form.isArchived) }} | |
0d42217e | 120 | {{ form_label(form.isArchived) }} |
db96045a | 121 | </div> |
392f4a26 | 122 | |
db96045a JB |
123 | <div class="input-field col s6 with-checkbox"> |
124 | {{ form_widget(form.isStarred) }} | |
0d42217e | 125 | {{ form_label(form.isStarred) }} |
db96045a | 126 | </div> |
89659c9e | 127 | |
5ecdfcd0 TC |
128 | <div class="input-field col s6 with-checkbox"> |
129 | {{ form_widget(form.isUnread) }} | |
130 | {{ form_label(form.isUnread) }} | |
131 | </div> | |
132 | ||
89659c9e | 133 | <div class="col s12"> |
0d42217e | 134 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> |
89659c9e | 135 | </div> |
a3bcd60a | 136 | |
db96045a | 137 | <div class="input-field col s12 with-checkbox"> |
a3bcd60a | 138 | {{ form_widget(form.previewPicture) }} |
0d42217e | 139 | {{ form_label(form.previewPicture) }} |
a3bcd60a NL |
140 | </div> |
141 | ||
e8911f7c JB |
142 | <div class="col s12"> |
143 | <label>{{ 'entry.filters.is_public_help'|trans }}</label> | |
144 | </div> | |
145 | ||
146 | <div class="input-field col s12 with-checkbox"> | |
147 | {{ form_widget(form.isPublic) }} | |
148 | {{ form_label(form.isPublic) }} | |
149 | </div> | |
150 | ||
d4ebe5c5 | 151 | <div class="col s12"> |
0d42217e | 152 | {{ form_label(form.language) }} |
89659c9e NL |
153 | </div> |
154 | ||
d4ebe5c5 JB |
155 | <div class="input-field col s12"> |
156 | {{ form_widget(form.language) }} | |
89659c9e NL |
157 | </div> |
158 | ||
10b35097 NL |
159 | <div class="col s12"> |
160 | {{ form_label(form.httpStatus) }} | |
161 | </div> | |
162 | ||
163 | <div class="input-field col s12"> | |
164 | {{ form_widget(form.httpStatus) }} | |
165 | </div> | |
166 | ||
392f4a26 | 167 | <div class="col s12"> |
0d42217e | 168 | {{ form_label(form.readingTime) }} |
392f4a26 | 169 | </div> |
e8911f7c | 170 | |
392f4a26 | 171 | <div class="input-field col s6"> |
bac5a345 | 172 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} |
0d42217e | 173 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> |
392f4a26 | 174 | </div> |
e8911f7c | 175 | |
392f4a26 | 176 | <div class="input-field col s6"> |
bac5a345 | 177 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} |
0d42217e | 178 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> |
392f4a26 AD |
179 | </div> |
180 | ||
e6439923 | 181 | <div class="input-field col s12"> |
0d42217e JB |
182 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} |
183 | {{ form_label(form.domainName) }} | |
bdd23b07 NL |
184 | </div> |
185 | ||
186 | <div class="col s12"> | |
0d42217e | 187 | {{ form_label(form.createdAt) }} |
790d18a3 | 188 | </div> |
790d18a3 | 189 | |
72ea6dd1 NL |
190 | <div class="input-field col s6"> |
191 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
0d42217e | 192 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> |
72ea6dd1 NL |
193 | </div> |
194 | <div class="input-field col s6"> | |
195 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
0d42217e | 196 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> |
72ea6dd1 NL |
197 | </div> |
198 | ||
392f4a26 | 199 | <div class="col s6"> |
0d42217e | 200 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> |
392f4a26 AD |
201 | </div> |
202 | ||
203 | <div class="col s6"> | |
0d42217e | 204 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> |
392f4a26 | 205 | </div> |
392f4a26 AD |
206 | </div> |
207 | ||
208 | </form> | |
209 | </div> | |
891456ba NL |
210 | {% endif %} |
211 | ||
f9987d4a NL |
212 | <!-- Sort --> |
213 | <div id="sort" class="side-nav fixed right-aligned"> | |
214 | ||
215 | <h4 class="center">{{ 'entry.sort.title'|trans }}</h4> | |
216 | ||
217 | <div class="row"> | |
218 | <div class="col s12"> | |
eb7b632e | 219 | <label>{{ 'entry.sort.status_label'|trans }}</label> |
f9987d4a NL |
220 | </div> |
221 | ||
222 | <div class="input-field col s12 with-checkbox"> | |
223 | <select> | |
224 | <option value="" disabled selected>Creation date</option> | |
eb7b632e TC |
225 | <option value="createdAt">{{ 'entry.sort.by.creation_date' | trans }}</option> |
226 | <option value="title">{{ 'entry.sort.by.title' | trans }}</option> | |
227 | <option value="updatedAt">{{ 'entry.sort.by.last_updated' | trans }}</option> | |
f9987d4a | 228 | </select> |
f9987d4a NL |
229 | </div> |
230 | ||
231 | <div class="col s12"> | |
232 | <div class="switch"> | |
233 | <label> | |
234 | Ascendant | |
235 | <input type="checkbox"> | |
236 | <span class="lever"></span> | |
237 | Descendant | |
238 | </label> | |
239 | </div> | |
240 | </div> | |
241 | </div> | |
242 | ||
243 | </div> | |
244 | ||
245 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | |
246 | ||
53e12188 | 247 | {% endblock %} |