]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block head %} | |
4 | {{ parent() }} | |
5 | {% if tag is defined and app.user.config.rssToken %} | |
6 | <link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, '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 | <div class="results"> | |
25 | <div class="nb-results"> | |
26 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | |
27 | <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a> | |
28 | {% if app.user.config.rssToken %} | |
29 | {% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %} | |
30 | {% endif %} | |
31 | </div> | |
32 | {% if entries.getNbPages > 1 %} | |
33 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
34 | {% endif %} | |
35 | </div> | |
36 | ||
37 | <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}"> | |
38 | {% for entry in entries %} | |
39 | <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12"> | |
40 | {% if listMode == 1 %} | |
41 | {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} | |
42 | {% elseif entry.previewPicture is null %} | |
43 | {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %} | |
44 | {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} | |
45 | {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} | |
46 | {% elseif not entry.previewPicture is null %} | |
47 | {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} | |
48 | {% endif %} | |
49 | </li> | |
50 | {% endfor %} | |
51 | </ul> | |
52 | ||
53 | {% if entries.getNbPages > 1 %} | |
54 | <div class="results"> | |
55 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
56 | </div> | |
57 | {% endif %} | |
58 | ||
59 | <!-- Export --> | |
60 | <div id="export" class="side-nav right-aligned"> | |
61 | {% set currentTag = null %} | |
62 | {% if tag is defined %} | |
63 | {% set currentTag = tag.slug %} | |
64 | {% endif %} | |
65 | {% if currentRoute == 'homepage' %} | |
66 | {% set currentRoute = 'unread' %} | |
67 | {% endif %} | |
68 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | |
69 | <ul> | |
70 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag }) }}">EPUB</a></li>{% endif %} | |
71 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi', 'tag' : currentTag }) }}">MOBI</a></li>{% endif %} | |
72 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf', 'tag' : currentTag }) }}">PDF</a></li>{% endif %} | |
73 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json', 'tag' : currentTag }) }}">JSON</a></li>{% endif %} | |
74 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv', 'tag' : currentTag }) }}">CSV</a></li>{% endif %} | |
75 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt', 'tag' : currentTag }) }}">TXT</a></li>{% endif %} | |
76 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml', 'tag' : currentTag }) }}">XML</a></li>{% endif %} | |
77 | </ul> | |
78 | </div> | |
79 | ||
80 | <!-- Filters --> | |
81 | {% if form is not null %} | |
82 | <div id="filters" class="side-nav right-aligned"> | |
83 | <form action="{{ path('all') }}"> | |
84 | ||
85 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> | |
86 | ||
87 | <div class="row"> | |
88 | <div class="col s12"> | |
89 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
90 | </div> | |
91 | ||
92 | <div class="input-field col s6 with-checkbox"> | |
93 | {{ form_widget(form.isArchived) }} | |
94 | {{ form_label(form.isArchived) }} | |
95 | </div> | |
96 | ||
97 | <div class="input-field col s6 with-checkbox"> | |
98 | {{ form_widget(form.isStarred) }} | |
99 | {{ form_label(form.isStarred) }} | |
100 | </div> | |
101 | ||
102 | <div class="input-field col s6 with-checkbox"> | |
103 | {{ form_widget(form.isUnread) }} | |
104 | {{ form_label(form.isUnread) }} | |
105 | </div> | |
106 | ||
107 | <div class="col s12"> | |
108 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> | |
109 | </div> | |
110 | ||
111 | <div class="input-field col s12 with-checkbox"> | |
112 | {{ form_widget(form.previewPicture) }} | |
113 | {{ form_label(form.previewPicture) }} | |
114 | </div> | |
115 | ||
116 | <div class="col s12"> | |
117 | <label>{{ 'entry.filters.is_public_help'|trans }}</label> | |
118 | </div> | |
119 | ||
120 | <div class="input-field col s12 with-checkbox"> | |
121 | {{ form_widget(form.isPublic) }} | |
122 | {{ form_label(form.isPublic) }} | |
123 | </div> | |
124 | ||
125 | <div class="col s12"> | |
126 | {{ form_label(form.language) }} | |
127 | </div> | |
128 | ||
129 | <div class="input-field col s12"> | |
130 | {{ form_widget(form.language) }} | |
131 | </div> | |
132 | ||
133 | <div class="col s12"> | |
134 | {{ form_label(form.httpStatus) }} | |
135 | </div> | |
136 | ||
137 | <div class="input-field col s12"> | |
138 | {{ form_widget(form.httpStatus) }} | |
139 | </div> | |
140 | ||
141 | <div class="col s12"> | |
142 | {{ form_label(form.readingTime) }} | |
143 | </div> | |
144 | ||
145 | <div class="input-field col s6"> | |
146 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
147 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
148 | </div> | |
149 | ||
150 | <div class="input-field col s6"> | |
151 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
152 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
153 | </div> | |
154 | ||
155 | <div class="input-field col s12"> | |
156 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
157 | {{ form_label(form.domainName) }} | |
158 | </div> | |
159 | ||
160 | <div class="col s12"> | |
161 | {{ form_label(form.createdAt) }} | |
162 | </div> | |
163 | ||
164 | <div class="input-field col s6"> | |
165 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
166 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
167 | </div> | |
168 | <div class="input-field col s6"> | |
169 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
170 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
171 | </div> | |
172 | ||
173 | <div class="col s6"> | |
174 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
175 | </div> | |
176 | ||
177 | <div class="col s6"> | |
178 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
179 | </div> | |
180 | </div> | |
181 | ||
182 | </form> | |
183 | </div> | |
184 | {% endif %} | |
185 | ||
186 | {% endblock %} |