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