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