]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
Fixed UI
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
CommitLineData
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" />&nbsp;
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') }}">
0d42217e 104 <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
392f4a26
AD
105
106 <div class="row">
d8e961bd
LD
107 {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
108 <div class="col s12 center-align">
109 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
110 </div>
111 {% endif %}
112
db96045a 113 <div class="col s12">
0d42217e 114 <label>{{ 'entry.filters.status_label'|trans }}</label>
db96045a
JB
115 </div>
116
117 <div class="input-field col s6 with-checkbox">
118 {{ form_widget(form.isArchived) }}
0d42217e 119 {{ form_label(form.isArchived) }}
db96045a 120 </div>
392f4a26 121
db96045a
JB
122 <div class="input-field col s6 with-checkbox">
123 {{ form_widget(form.isStarred) }}
0d42217e 124 {{ form_label(form.isStarred) }}
db96045a 125 </div>
89659c9e 126
5ecdfcd0
TC
127 <div class="input-field col s6 with-checkbox">
128 {{ form_widget(form.isUnread) }}
129 {{ form_label(form.isUnread) }}
130 </div>
131
89659c9e 132 <div class="col s12">
0d42217e 133 <label>{{ 'entry.filters.preview_picture_help'|trans }}</label>
89659c9e 134 </div>
a3bcd60a 135
db96045a 136 <div class="input-field col s12 with-checkbox">
a3bcd60a 137 {{ form_widget(form.previewPicture) }}
0d42217e 138 {{ form_label(form.previewPicture) }}
a3bcd60a
NL
139 </div>
140
e8911f7c
JB
141 <div class="col s12">
142 <label>{{ 'entry.filters.is_public_help'|trans }}</label>
143 </div>
144
145 <div class="input-field col s12 with-checkbox">
146 {{ form_widget(form.isPublic) }}
147 {{ form_label(form.isPublic) }}
148 </div>
149
d4ebe5c5 150 <div class="col s12">
0d42217e 151 {{ form_label(form.language) }}
89659c9e
NL
152 </div>
153
d4ebe5c5
JB
154 <div class="input-field col s12">
155 {{ form_widget(form.language) }}
89659c9e
NL
156 </div>
157
10b35097
NL
158 <div class="col s12">
159 {{ form_label(form.httpStatus) }}
160 </div>
161
162 <div class="input-field col s12">
163 {{ form_widget(form.httpStatus) }}
164 </div>
165
392f4a26 166 <div class="col s12">
0d42217e 167 {{ form_label(form.readingTime) }}
392f4a26 168 </div>
e8911f7c 169
392f4a26 170 <div class="input-field col s6">
bac5a345 171 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
0d42217e 172 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
392f4a26 173 </div>
e8911f7c 174
392f4a26 175 <div class="input-field col s6">
bac5a345 176 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
0d42217e 177 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
392f4a26
AD
178 </div>
179
e6439923 180 <div class="input-field col s12">
0d42217e
JB
181 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
182 {{ form_label(form.domainName) }}
bdd23b07
NL
183 </div>
184
185 <div class="col s12">
0d42217e 186 {{ form_label(form.createdAt) }}
790d18a3 187 </div>
790d18a3 188
72ea6dd1
NL
189 <div class="input-field col s6">
190 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
0d42217e 191 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
72ea6dd1
NL
192 </div>
193 <div class="input-field col s6">
194 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
0d42217e 195 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
72ea6dd1
NL
196 </div>
197
392f4a26 198 <div class="col s6">
0d42217e 199 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
392f4a26
AD
200 </div>
201
202 <div class="col s6">
0d42217e 203 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
392f4a26 204 </div>
392f4a26
AD
205 </div>
206
207 </form>
208 </div>
891456ba
NL
209 {% endif %}
210
f9987d4a 211 <!-- Sort -->
19c407f2 212 {% if sortForm is not null %}
136f710d 213 <div id="sort" class="side-nav right-aligned">
9b555229 214 <form action="{{ previousRoute }}">
f9987d4a
NL
215 <h4 class="center">{{ 'entry.sort.title'|trans }}</h4>
216
19c407f2 217 <div class="row">
9b555229 218 <div class="col s12">
19c407f2
NL
219 {{ form_label(sortForm.sortType) }}
220 </div>
f9987d4a 221
9b555229
NL
222 <div class="input-field col s12">
223 {{ form_widget(sortForm.sortType) }}
224 </div>
225
19c407f2 226 <div class="col s12">
9b555229
NL
227 {{ form_label(sortForm.sortOrder) }}
228 </div>
229
230 <div class="input-field col s12">
231 {{ form_widget(sortForm.sortOrder) }}
19c407f2 232 </div>
f9987d4a 233
19c407f2
NL
234 <div class="col s12">
235 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
f9987d4a
NL
236 </div>
237 </div>
19c407f2 238 </form>
f9987d4a 239 </div>
19c407f2 240 {% endif %}
f9987d4a 241
53e12188 242{% endblock %}