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