]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block title %} | |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | |
5 | ||
6 | {% if currentRoute == 'starred' %} | |
7 | {{ 'entry.page_titles.starred'|trans }} | |
8 | {% elseif currentRoute == 'archive' %} | |
9 | {{ 'entry.page_titles.archived'|trans }} | |
10 | {% elseif currentRoute == 'all' %} | |
11 | {{ 'entry.page_titles.filtered'|trans }} | |
12 | {% else %} | |
13 | {{ 'entry.page_titles.unread'|trans }} | |
14 | {% endif %} | |
15 | ||
16 | {% endblock %} | |
17 | ||
18 | {% block content %} | |
19 | {% block pager %} | |
20 | <div class="results clearfix"> | |
21 | <div class="nb-results left"> | |
22 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | |
23 | </div> | |
24 | <ul class="pagination right"> | |
25 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} | |
26 | <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> | |
27 | <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a> | |
28 | </li> | |
29 | {% endfor %} | |
30 | </ul> | |
31 | </div> | |
32 | {% endblock %} | |
33 | <br /> | |
34 | <ul class="row data"> | |
35 | {% for entry in entries %} | |
36 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | |
37 | <div class="card"> | |
38 | ||
39 | <div class="card-body"> | |
40 | {% if not entry.previewPicture is null %} | |
41 | <div class="card-image waves-effect waves-block waves-light"> | |
42 | <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div> | |
43 | </div> | |
44 | {% endif %} | |
45 | ||
46 | <div class="card-content"> | |
47 | {% if not entry.previewPicture is null %} | |
48 | <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i> | |
49 | {% endif %} | |
50 | ||
51 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span> | |
52 | ||
53 | <div class="estimatedTime grey-text"> | |
54 | <span class="tool reading-time"> | |
55 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | |
56 | {% if readingTime > 0 %} | |
57 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }} | |
58 | {% else %} | |
59 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} | |
60 | {% endif %} | |
61 | </span> | |
62 | </div> | |
63 | ||
64 | {% if entry.previewPicture is null %} | |
65 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> | |
66 | {% endif %} | |
67 | </div> | |
68 | </div> | |
69 | ||
70 | {% if not entry.previewPicture is null %} | |
71 | <div class="card-reveal"> | |
72 | <i class="card-title grey-text text-darken-4 mdi-card-close right"></i> | |
73 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | |
74 | ||
75 | <div class="estimatedTime grey-text"> | |
76 | <span class="tool reading-time"> | |
77 | {% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %} | |
78 | </span> | |
79 | </div> | |
80 | ||
81 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> | |
82 | </div> | |
83 | {% endif %} | |
84 | ||
85 | <div class="card-action"> | |
86 | <span class="bold"> | |
87 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a> | |
88 | </bold> | |
89 | ||
90 | <ul class="tools links right"> | |
91 | <li> | |
92 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a> | |
93 | <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a> | |
94 | <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | |
95 | </li> | |
96 | </ul> | |
97 | </div> | |
98 | </div> | |
99 | </li> | |
100 | {% endfor %} | |
101 | </ul> | |
102 | ||
103 | <!-- Export --> | |
104 | <div id="export" class="side-nav fixed right-aligned"> | |
105 | {% set currentRoute = app.request.attributes.get('_route') %} | |
106 | {% if currentRoute == 'homepage' %} | |
107 | {% set currentRoute = 'unread' %} | |
108 | {% endif %} | |
109 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | |
110 | <ul> | |
111 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} | |
112 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} | |
113 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">PDF</a></li>{% endif %} | |
114 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">JSON</a></li>{% endif %} | |
115 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">CSV</a></li>{% endif %} | |
116 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">TXT</a></li>{% endif %} | |
117 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | |
118 | </ul> | |
119 | </div> | |
120 | ||
121 | <!-- Filters --> | |
122 | <div id="filters" class="side-nav fixed right-aligned"> | |
123 | <form action="{{ path('all') }}"> | |
124 | ||
125 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> | |
126 | ||
127 | <div class="row"> | |
128 | <div class="col s12"> | |
129 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
130 | </div> | |
131 | ||
132 | <div class="input-field col s6 with-checkbox"> | |
133 | {{ form_widget(form.isArchived) }} | |
134 | {{ form_label(form.isArchived) }} | |
135 | </div> | |
136 | ||
137 | <div class="input-field col s6 with-checkbox"> | |
138 | {{ form_widget(form.isStarred) }} | |
139 | {{ form_label(form.isStarred) }} | |
140 | </div> | |
141 | ||
142 | <div class="col s12"> | |
143 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> | |
144 | </div> | |
145 | ||
146 | <div class="input-field col s12 with-checkbox"> | |
147 | {{ form_widget(form.previewPicture) }} | |
148 | {{ form_label(form.previewPicture) }} | |
149 | </div> | |
150 | ||
151 | <div class="col s12"> | |
152 | {{ form_label(form.language) }} | |
153 | </div> | |
154 | ||
155 | <div class="input-field col s12"> | |
156 | {{ form_widget(form.language) }} | |
157 | </div> | |
158 | ||
159 | <div class="col s12"> | |
160 | {{ form_label(form.readingTime) }} | |
161 | </div> | |
162 | <div class="input-field col s6"> | |
163 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
164 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
165 | </div> | |
166 | <div class="input-field col s6"> | |
167 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
168 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
169 | </div> | |
170 | ||
171 | <div class="input-field col s12"> | |
172 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
173 | {{ form_label(form.domainName) }} | |
174 | </div> | |
175 | ||
176 | <div class="col s12"> | |
177 | {{ form_label(form.createdAt) }} | |
178 | </div> | |
179 | ||
180 | <div class="input-field col s6"> | |
181 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
182 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
183 | </div> | |
184 | <div class="input-field col s6"> | |
185 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
186 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
187 | </div> | |
188 | ||
189 | <div class="col s6"> | |
190 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
191 | </div> | |
192 | ||
193 | <div class="col s6"> | |
194 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
195 | </div> | |
196 | </div> | |
197 | ||
198 | </form> | |
199 | </div> | |
200 | {% endblock %} |