]>
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 %} | |
f836b98f S |
27 | <div class="results"> |
28 | <div class="nb-results"> | |
817724a7 | 29 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} |
9aa99128 | 30 | <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a> |
531c8d0a TC |
31 | {% if app.user.config.feedToken %} |
32 | {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %} | |
bd40f1af | 33 | {% endif %} |
817724a7 JB |
34 | </div> |
35 | {% if entries.getNbPages > 1 %} | |
36 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
37 | {% endif %} | |
38 | </div> | |
39 | ||
812c980f | 40 | <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}"> |
428af5a8 | 41 | {% for entry in entries %} |
812c980f | 42 | <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12"> |
9aa99128 | 43 | {% if listMode == 1 %} |
9f01d0fd | 44 | {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} |
8d7b4f0e JB |
45 | {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} |
46 | {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} | |
cefbe6a8 | 47 | {% else %} |
8d7b4f0e JB |
48 | {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} |
49 | {% endif %} | |
428af5a8 NL |
50 | </li> |
51 | {% endfor %} | |
52 | </ul> | |
392f4a26 | 53 | |
817724a7 | 54 | {% if entries.getNbPages > 1 %} |
f836b98f S |
55 | <div class="results"> |
56 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
57 | </div> | |
817724a7 JB |
58 | {% endif %} |
59 | ||
03690d13 | 60 | <!-- Export --> |
64f81bc3 | 61 | <div id="export" class="side-nav right-aligned"> |
bde23a44 | 62 | {% set currentTag = null %} |
920d8859 | 63 | {% if tag is defined %} |
bd40f1af | 64 | {% set currentTag = tag.slug %} |
03690d13 | 65 | {% endif %} |
93c5b47e KD |
66 | {% set exportSearchTerm = null %} |
67 | {% if searchTerm is defined %} | |
68 | {% set exportSearchTerm = searchTerm %} | |
69 | {% endif %} | |
70 | {% set previousRoute = app.request.attributes.get('currentRoute') %} | |
0d42217e | 71 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> |
03690d13 | 72 | <ul> |
93c5b47e KD |
73 | {% 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 %} |
74 | {% 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 %} | |
75 | {% 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 %} | |
76 | {% 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 %} | |
77 | {% 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 %} | |
78 | {% 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 %} | |
79 | {% 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 |
80 | </ul> |
81 | </div> | |
82 | ||
392f4a26 | 83 | <!-- Filters --> |
891456ba | 84 | {% if form is not null %} |
64f81bc3 | 85 | <div id="filters" class="side-nav right-aligned"> |
89659c9e | 86 | <form action="{{ path('all') }}"> |
392f4a26 | 87 | |
0d42217e | 88 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> |
392f4a26 AD |
89 | |
90 | <div class="row"> | |
d8e961bd LD |
91 | {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %} |
92 | <div class="col s12 center-align"> | |
93 | <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a> | |
94 | </div> | |
95 | {% endif %} | |
96 | ||
db96045a | 97 | <div class="col s12"> |
0d42217e | 98 | <label>{{ 'entry.filters.status_label'|trans }}</label> |
db96045a JB |
99 | </div> |
100 | ||
101 | <div class="input-field col s6 with-checkbox"> | |
102 | {{ form_widget(form.isArchived) }} | |
0d42217e | 103 | {{ form_label(form.isArchived) }} |
db96045a | 104 | </div> |
392f4a26 | 105 | |
db96045a JB |
106 | <div class="input-field col s6 with-checkbox"> |
107 | {{ form_widget(form.isStarred) }} | |
0d42217e | 108 | {{ form_label(form.isStarred) }} |
db96045a | 109 | </div> |
89659c9e | 110 | |
5ecdfcd0 TC |
111 | <div class="input-field col s6 with-checkbox"> |
112 | {{ form_widget(form.isUnread) }} | |
113 | {{ form_label(form.isUnread) }} | |
114 | </div> | |
115 | ||
89659c9e | 116 | <div class="col s12"> |
0d42217e | 117 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> |
89659c9e | 118 | </div> |
a3bcd60a | 119 | |
db96045a | 120 | <div class="input-field col s12 with-checkbox"> |
a3bcd60a | 121 | {{ form_widget(form.previewPicture) }} |
0d42217e | 122 | {{ form_label(form.previewPicture) }} |
a3bcd60a NL |
123 | </div> |
124 | ||
e8911f7c JB |
125 | <div class="col s12"> |
126 | <label>{{ 'entry.filters.is_public_help'|trans }}</label> | |
127 | </div> | |
128 | ||
129 | <div class="input-field col s12 with-checkbox"> | |
130 | {{ form_widget(form.isPublic) }} | |
131 | {{ form_label(form.isPublic) }} | |
132 | </div> | |
133 | ||
d4ebe5c5 | 134 | <div class="col s12"> |
0d42217e | 135 | {{ form_label(form.language) }} |
89659c9e NL |
136 | </div> |
137 | ||
d4ebe5c5 JB |
138 | <div class="input-field col s12"> |
139 | {{ form_widget(form.language) }} | |
89659c9e NL |
140 | </div> |
141 | ||
10b35097 NL |
142 | <div class="col s12"> |
143 | {{ form_label(form.httpStatus) }} | |
144 | </div> | |
145 | ||
146 | <div class="input-field col s12"> | |
147 | {{ form_widget(form.httpStatus) }} | |
148 | </div> | |
149 | ||
392f4a26 | 150 | <div class="col s12"> |
0d42217e | 151 | {{ form_label(form.readingTime) }} |
392f4a26 | 152 | </div> |
e8911f7c | 153 | |
392f4a26 | 154 | <div class="input-field col s6"> |
bac5a345 | 155 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} |
0d42217e | 156 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> |
392f4a26 | 157 | </div> |
e8911f7c | 158 | |
392f4a26 | 159 | <div class="input-field col s6"> |
bac5a345 | 160 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} |
0d42217e | 161 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> |
392f4a26 AD |
162 | </div> |
163 | ||
e6439923 | 164 | <div class="input-field col s12"> |
0d42217e JB |
165 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} |
166 | {{ form_label(form.domainName) }} | |
bdd23b07 NL |
167 | </div> |
168 | ||
169 | <div class="col s12"> | |
0d42217e | 170 | {{ form_label(form.createdAt) }} |
790d18a3 | 171 | </div> |
790d18a3 | 172 | |
72ea6dd1 NL |
173 | <div class="input-field col s6"> |
174 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
0d42217e | 175 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> |
72ea6dd1 NL |
176 | </div> |
177 | <div class="input-field col s6"> | |
178 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
0d42217e | 179 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> |
72ea6dd1 NL |
180 | </div> |
181 | ||
392f4a26 | 182 | <div class="col s6"> |
0d42217e | 183 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> |
392f4a26 AD |
184 | </div> |
185 | ||
186 | <div class="col s6"> | |
0d42217e | 187 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> |
392f4a26 | 188 | </div> |
392f4a26 AD |
189 | </div> |
190 | ||
191 | </form> | |
192 | </div> | |
891456ba NL |
193 | {% endif %} |
194 | ||
53e12188 | 195 | {% endblock %} |