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