]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block head %} | |
4 | {{ parent() }} | |
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}) }}" /> | |
7 | {% endif %} | |
8 | {% endblock %} | |
9 | ||
10 | {% block title %} | |
11 | {% set filter = '' %} | |
12 | {% if tag is defined %} | |
13 | {% set filter = tag.slug %} | |
14 | {% endif %} | |
15 | {% if searchTerm is defined and searchTerm is not empty %} | |
16 | {% set filter = searchTerm %} | |
17 | {% endif %} | |
18 | {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %} | |
19 | {% endblock %} | |
20 | ||
21 | {% block content %} | |
22 | {% set listMode = app.user.config.listMode %} | |
23 | {% set currentRoute = app.request.attributes.get('_route') %} | |
24 | {% if currentRoute == 'homepage' %} | |
25 | {% set currentRoute = 'unread' %} | |
26 | {% endif %} | |
27 | <form name="form_mass_action" action="{{ path('mass_action') }}" method="post"> | |
28 | <div class="results"> | |
29 | <div class="nb-results"> | |
30 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | |
31 | <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a> | |
32 | {% if app.user.config.feedToken %} | |
33 | {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %} | |
34 | {% endif %} | |
35 | </div> | |
36 | {% if entries.getNbPages > 1 %} | |
37 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
38 | {% endif %} | |
39 | </div> | |
40 | ||
41 | <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}"> | |
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> | |
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> | |
53 | </span> | |
54 | {% endif %} | |
55 | </li> | |
56 | ||
57 | {% for entry in entries %} | |
58 | <li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12"> | |
59 | {% if listMode == 1 %} | |
60 | {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} | |
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 %} | |
63 | {% else %} | |
64 | {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} | |
65 | {% endif %} | |
66 | </li> | |
67 | {% endfor %} | |
68 | </ul> | |
69 | </form> | |
70 | ||
71 | {% if entries.getNbPages > 1 %} | |
72 | <div class="results"> | |
73 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
74 | </div> | |
75 | {% endif %} | |
76 | ||
77 | <!-- Export --> | |
78 | <div id="export" class="side-nav right-aligned"> | |
79 | {% set currentTag = null %} | |
80 | {% if tag is defined %} | |
81 | {% set currentTag = tag.slug %} | |
82 | {% endif %} | |
83 | {% set exportSearchTerm = null %} | |
84 | {% if searchTerm is defined %} | |
85 | {% set exportSearchTerm = searchTerm %} | |
86 | {% endif %} | |
87 | {% set previousRoute = app.request.attributes.get('currentRoute') %} | |
88 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | |
89 | <ul> | |
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 %} | |
97 | </ul> | |
98 | </div> | |
99 | ||
100 | <!-- Filters --> | |
101 | {% if form is not null %} | |
102 | <div id="filters" class="side-nav right-aligned"> | |
103 | <form action="{{ path('all') }}"> | |
104 | ||
105 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> | |
106 | ||
107 | <div class="row"> | |
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 | ||
114 | <div class="col s12"> | |
115 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
116 | </div> | |
117 | ||
118 | <div class="input-field col s6 with-checkbox"> | |
119 | {{ form_widget(form.isArchived) }} | |
120 | {{ form_label(form.isArchived) }} | |
121 | </div> | |
122 | ||
123 | <div class="input-field col s6 with-checkbox"> | |
124 | {{ form_widget(form.isStarred) }} | |
125 | {{ form_label(form.isStarred) }} | |
126 | </div> | |
127 | ||
128 | <div class="input-field col s6 with-checkbox"> | |
129 | {{ form_widget(form.isUnread) }} | |
130 | {{ form_label(form.isUnread) }} | |
131 | </div> | |
132 | ||
133 | <div class="col s12"> | |
134 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> | |
135 | </div> | |
136 | ||
137 | <div class="input-field col s12 with-checkbox"> | |
138 | {{ form_widget(form.previewPicture) }} | |
139 | {{ form_label(form.previewPicture) }} | |
140 | </div> | |
141 | ||
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 | ||
151 | <div class="col s12"> | |
152 | {{ form_label(form.language) }} | |
153 | </div> | |
154 | ||
155 | <div class="input-field col s12"> | |
156 | {{ form_widget(form.language) }} | |
157 | </div> | |
158 | ||
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 | ||
167 | <div class="col s12"> | |
168 | {{ form_label(form.readingTime) }} | |
169 | </div> | |
170 | ||
171 | <div class="input-field col s6"> | |
172 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
173 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
174 | </div> | |
175 | ||
176 | <div class="input-field col s6"> | |
177 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
178 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
179 | </div> | |
180 | ||
181 | <div class="input-field col s12"> | |
182 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
183 | {{ form_label(form.domainName) }} | |
184 | </div> | |
185 | ||
186 | <div class="col s12"> | |
187 | {{ form_label(form.createdAt) }} | |
188 | </div> | |
189 | ||
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} }) }} | |
192 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
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} }) }} | |
196 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
197 | </div> | |
198 | ||
199 | <div class="col s6"> | |
200 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
201 | </div> | |
202 | ||
203 | <div class="col s6"> | |
204 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
205 | </div> | |
206 | </div> | |
207 | ||
208 | </form> | |
209 | </div> | |
210 | {% endif %} | |
211 | ||
212 | {% endblock %} |