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