]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block title %} | |
4 | {% include "@WallabagCore/themes/common/Entry/_title.html.twig" %} | |
5 | {% endblock %} | |
6 | ||
7 | {% block content %} | |
8 | <div class="results clearfix"> | |
9 | <div class="nb-results left"> | |
10 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | |
11 | </div> | |
12 | {% if entries.getNbPages > 1 %} | |
13 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
14 | {% endif %} | |
15 | </div> | |
16 | ||
17 | <br /> | |
18 | <ul class="row data"> | |
19 | {% for entry in entries %} | |
20 | <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12"> | |
21 | <div class="card"> | |
22 | ||
23 | <div class="card-body"> | |
24 | {% if not entry.previewPicture is null %} | |
25 | <div class="card-image waves-effect waves-block waves-light"> | |
26 | <ul class="card-entry-labels"> | |
27 | {% for tag in entry.tags | slice(0, 3) %} | |
28 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | |
29 | {% endfor %} | |
30 | </ul> | |
31 | <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div> | |
32 | </div> | |
33 | {% endif %} | |
34 | ||
35 | <div class="card-content"> | |
36 | {% if not entry.previewPicture is null %} | |
37 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | |
38 | {% endif %} | |
39 | ||
40 | <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">{{ entry.title| striptags | truncate(80, true, '…') | raw }}</a></span> | |
41 | ||
42 | <div class="original grey-text"> | |
43 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | |
44 | <span>{{ entry.domainName|removeWww|truncate(30, false, '…') }}</span> | |
45 | </a> | |
46 | </div> | |
47 | ||
48 | {% if entry.previewPicture is null %} | |
49 | <p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p> | |
50 | <ul class="card-entry-labels-hidden"> | |
51 | {% for tag in entry.tags | slice(0, 2) %} | |
52 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | |
53 | {% endfor %} | |
54 | </ul> | |
55 | {% endif %} | |
56 | </div> | |
57 | </div> | |
58 | ||
59 | {% if not entry.previewPicture is null %} | |
60 | <div class="card-reveal"> | |
61 | <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i> | |
62 | <span class="card-title" title="{{ entry.title | raw | striptags }}"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title | raw | striptags | truncate(90, true, '…') }}</a></span> | |
63 | ||
64 | <p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p> | |
65 | ||
66 | <ul class="card-entry-labels-hidden"> | |
67 | {% for tag in entry.tags %} | |
68 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | |
69 | {% endfor %} | |
70 | </ul> | |
71 | </div> | |
72 | {% endif %} | |
73 | ||
74 | <div class="card-action"> | |
75 | <span class="reading-time grey-text"> | |
76 | <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i> | |
77 | {{ entry.readingTime / app.user.config.readingSpeed }} min | |
78 | </span> | |
79 | ||
80 | <ul class="tools right"> | |
81 | <li> | |
82 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a> | |
83 | <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a> | |
84 | <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a> | |
85 | </li> | |
86 | </ul> | |
87 | </div> | |
88 | </div> | |
89 | </li> | |
90 | {% endfor %} | |
91 | </ul> | |
92 | ||
93 | {% if entries.getNbPages > 1 %} | |
94 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | |
95 | {% endif %} | |
96 | ||
97 | <!-- Export --> | |
98 | <div id="export" class="side-nav fixed right-aligned"> | |
99 | {% set currentRoute = app.request.attributes.get('_route') %} | |
100 | {% if currentRoute == 'homepage' %} | |
101 | {% set currentRoute = 'unread' %} | |
102 | {% endif %} | |
103 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | |
104 | <ul> | |
105 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} | |
106 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} | |
107 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">PDF</a></li>{% endif %} | |
108 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">JSON</a></li>{% endif %} | |
109 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">CSV</a></li>{% endif %} | |
110 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">TXT</a></li>{% endif %} | |
111 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | |
112 | </ul> | |
113 | </div> | |
114 | ||
115 | <!-- Filters --> | |
116 | {% if form is not null %} | |
117 | <div id="filters" class="side-nav fixed right-aligned"> | |
118 | <form action="{{ path('all') }}"> | |
119 | ||
120 | <h4 class="center">{{ 'entry.filters.title'|trans }}</h4> | |
121 | ||
122 | <div class="row"> | |
123 | <div class="col s12"> | |
124 | <label>{{ 'entry.filters.status_label'|trans }}</label> | |
125 | </div> | |
126 | ||
127 | <div class="input-field col s6 with-checkbox"> | |
128 | {{ form_widget(form.isArchived) }} | |
129 | {{ form_label(form.isArchived) }} | |
130 | </div> | |
131 | ||
132 | <div class="input-field col s6 with-checkbox"> | |
133 | {{ form_widget(form.isStarred) }} | |
134 | {{ form_label(form.isStarred) }} | |
135 | </div> | |
136 | ||
137 | <div class="input-field col s6 with-checkbox"> | |
138 | {{ form_widget(form.isUnread) }} | |
139 | {{ form_label(form.isUnread) }} | |
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 | {% endif %} | |
201 | ||
202 | {% endblock %} |