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