]>
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 | {{ 'entry.list.reading_time'|trans }} | |
78 | {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur"><</small> 1{% endif %} min | |
79 | </span> | |
80 | </div> | |
81 | ||
82 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> | |
83 | </div> | |
84 | {% endif %} | |
85 | ||
86 | <div class="card-action"> | |
87 | <span class="bold"> | |
88 | <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> | |
89 | </bold> | |
90 | ||
91 | <ul class="tools links right"> | |
92 | <li> | |
93 | <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> | |
94 | <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> | |
95 | <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | |
96 | </li> | |
97 | </ul> | |
98 | </div> | |
99 | </div> | |
100 | </li> | |
101 | {% endfor %} | |
102 | </ul> | |
103 | ||
104 | <!-- Export --> | |
105 | <div id="export" class="side-nav fixed right-aligned"> | |
106 | {% set currentRoute = app.request.attributes.get('_route') %} | |
107 | {% if currentRoute == 'homepage' %} | |
108 | {% set currentRoute = 'unread' %} | |
109 | {% endif %} | |
110 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | |
111 | <ul> | |
112 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} | |
113 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} | |
114 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">PDF</a></li>{% endif %} | |
115 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">JSON</a></li>{% endif %} | |
116 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">CSV</a></li>{% endif %} | |
117 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">TXT</a></li>{% endif %} | |
118 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | |
119 | </ul> | |
120 | </div> | |
121 | ||
122 | <!-- Filters --> | |
123 | <div id="filters" class="side-nav fixed right-aligned"> | |
124 | <form action="{{ path('all') }}"> | |
125 | ||
126 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> | |
127 | ||
128 | <div class="row"> | |
129 | <div class="col s12"> | |
130 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
131 | </div> | |
132 | ||
133 | <div class="input-field col s6 with-checkbox"> | |
134 | {{ form_widget(form.isArchived) }} | |
135 | {{ form_label(form.isArchived) }} | |
136 | </div> | |
137 | ||
138 | <div class="input-field col s6 with-checkbox"> | |
139 | {{ form_widget(form.isStarred) }} | |
140 | {{ form_label(form.isStarred) }} | |
141 | </div> | |
142 | ||
143 | <div class="col s12"> | |
144 | <label>{{ 'entry.filters.preview_picture_help'|trans }}</label> | |
145 | </div> | |
146 | ||
147 | <div class="input-field col s12 with-checkbox"> | |
148 | {{ form_widget(form.previewPicture) }} | |
149 | {{ form_label(form.previewPicture) }} | |
150 | </div> | |
151 | ||
152 | <div class="col s12"> | |
153 | {{ form_label(form.language) }} | |
154 | </div> | |
155 | ||
156 | <div class="input-field col s12"> | |
157 | {{ form_widget(form.language) }} | |
158 | </div> | |
159 | ||
160 | <div class="col s12"> | |
161 | {{ form_label(form.readingTime) }} | |
162 | </div> | |
163 | <div class="input-field col s6"> | |
164 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
165 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
166 | </div> | |
167 | <div class="input-field col s6"> | |
168 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
169 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
170 | </div> | |
171 | ||
172 | <div class="input-field col s12"> | |
173 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
174 | {{ form_label(form.domainName) }} | |
175 | </div> | |
176 | ||
177 | <div class="col s12"> | |
178 | {{ form_label(form.createdAt) }} | |
179 | </div> | |
180 | ||
181 | <div class="input-field col s6"> | |
182 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
183 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
184 | </div> | |
185 | <div class="input-field col s6"> | |
186 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
187 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
188 | </div> | |
189 | ||
190 | <div class="col s6"> | |
191 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
192 | </div> | |
193 | ||
194 | <div class="col s6"> | |
195 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
196 | </div> | |
197 | </div> | |
198 | ||
199 | </form> | |
200 | </div> | |
201 | {% endblock %} |