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