]>
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 | {% if app.user.config.rssToken %} | |
32 | {% include "@WallabagCore/themes/common/Entry/_rss_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 | <div class="col s12"> | |
87 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
88 | </div> | |
89 | ||
90 | <div class="input-field col s6 with-checkbox"> | |
91 | {{ form_widget(form.isArchived) }} | |
92 | {{ form_label(form.isArchived) }} | |
93 | </div> | |
94 | ||
95 | <div class="input-field col s6 with-checkbox"> | |
96 | {{ form_widget(form.isStarred) }} | |
97 | {{ form_label(form.isStarred) }} | |
98 | </div> | |
99 | ||
100 | <div class="input-field col s6 with-checkbox"> | |
101 | {{ form_widget(form.isUnread) }} | |
102 | {{ form_label(form.isUnread) }} | |
103 | </div> | |
104 | ||
105 | <div class="col s12"> | |
106 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> | |
107 | </div> | |
108 | ||
109 | <div class="input-field col s12 with-checkbox"> | |
110 | {{ form_widget(form.previewPicture) }} | |
111 | {{ form_label(form.previewPicture) }} | |
112 | </div> | |
113 | ||
114 | <div class="col s12"> | |
115 | <label>{{ 'entry.filters.is_public_help'|trans }}</label> | |
116 | </div> | |
117 | ||
118 | <div class="input-field col s12 with-checkbox"> | |
119 | {{ form_widget(form.isPublic) }} | |
120 | {{ form_label(form.isPublic) }} | |
121 | </div> | |
122 | ||
123 | <div class="col s12"> | |
124 | {{ form_label(form.language) }} | |
125 | </div> | |
126 | ||
127 | <div class="input-field col s12"> | |
128 | {{ form_widget(form.language) }} | |
129 | </div> | |
130 | ||
131 | <div class="col s12"> | |
132 | {{ form_label(form.httpStatus) }} | |
133 | </div> | |
134 | ||
135 | <div class="input-field col s12"> | |
136 | {{ form_widget(form.httpStatus) }} | |
137 | </div> | |
138 | ||
139 | <div class="col s12"> | |
140 | {{ form_label(form.readingTime) }} | |
141 | </div> | |
142 | ||
143 | <div class="input-field col s6"> | |
144 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
145 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
146 | </div> | |
147 | ||
148 | <div class="input-field col s6"> | |
149 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
150 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
151 | </div> | |
152 | ||
153 | <div class="input-field col s12"> | |
154 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
155 | {{ form_label(form.domainName) }} | |
156 | </div> | |
157 | ||
158 | <div class="col s12"> | |
159 | {{ form_label(form.createdAt) }} | |
160 | </div> | |
161 | ||
162 | <div class="input-field col s6"> | |
163 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
164 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
165 | </div> | |
166 | <div class="input-field col s6"> | |
167 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
168 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
169 | </div> | |
170 | ||
171 | <div class="col s6"> | |
172 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
173 | </div> | |
174 | ||
175 | <div class="col s6"> | |
176 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
177 | </div> | |
178 | </div> | |
179 | ||
180 | </form> | |
181 | </div> | |
182 | {% endif %} | |
183 | ||
184 | {% endblock %} |