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