]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
💄 Add untagged list link to filter menu
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
CommitLineData
ad4d1caa 1{% extends "WallabagCoreBundle::layout.html.twig" %}
9d50517c 2
bd40f1af
TC
3{% block head %}
4 {{ parent() }}
531c8d0a
TC
5 {% if tag is defined and app.user.config.feedToken %}
6 <link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
bd40f1af
TC
7 {% endif %}
8{% endblock %}
9
371bcca0 10{% block title %}
398de405 11 {% set filter = '' %}
7a5043f1 12 {% if tag is defined %}
398de405 13 {% set filter = tag %}
7a5043f1 14 {% endif %}
398de405
NL
15 {% if searchTerm is defined and searchTerm is not empty %}
16 {% set filter = searchTerm %}
17 {% endif %}
18 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %}
371bcca0 19{% endblock %}
9d50517c 20
9d50517c 21{% block content %}
bd40f1af 22 {% set currentRoute = app.request.attributes.get('_route') %}
09ef25c3
NL
23 {% if currentRoute == 'homepage' %}
24 {% set currentRoute = 'unread' %}
25 {% endif %}
9aa99128 26 {% set listMode = app.user.config.listMode %}
817724a7
JB
27 <div class="results">
28 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
29 <div class="pagination">
64f81bc3 30 <a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-24">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
531c8d0a
TC
31 {% if app.user.config.feedToken %}
32 {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %}
bd40f1af 33 {% endif %}
50f35f0d 34 {% if currentRoute in ['unread', 'starred', 'archive', 'untagged', 'all'] %}
fe5850d6 35 <a href="{{ path('random_entry', { 'type': currentRoute }) }}"><i class="btn-clickable material-icons md-24 js-random-action">casino</i></a>
50f35f0d 36 {% endif %}
64f81bc3
TC
37 <i class="btn-clickable download-btn material-icons md-24 js-export-action">file_download</i>
38 <i class="btn-clickable filter-btn material-icons md-24 js-filters-action">filter_list</i>
817724a7
JB
39 {% if entries.getNbPages > 1 %}
40 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
41 {% endif %}
42 </div>
43 </div>
9d50517c 44
0d42217e 45 {% for entry in entries %}
9aa99128 46 <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}">
4d9128de 47 <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title | striptags | truncate(80, true, '…') | default('entry.default_title'|trans) | raw }}</a></h2>
4a749cad 48
41022cb2 49 {% set readingTime = entry.readingTime / app.user.config.readingSpeed * 200 %}
4a749cad 50 <div class="estimatedTime">
0d42217e 51 <span class="tool reading-time">
4a749cad
NL
52 {% if readingTime > 0 %}
53 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
0d42217e 54 {% else %}
4a749cad 55 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
0d42217e 56 {% endif %}
4a749cad 57 </span>
1c282b1d
NL
58 <span class="tool created-at">
59 <i class="tool icon icon-calendar" title="{{ 'entry.view.created_at'|trans }}">
60 {{ entry.createdAt|date('Y-m-d') }}
61 </i>
62 </span>
4a749cad 63 </div>
0d42217e
JB
64
65 <ul class="tools links">
a22b8043 66 <li><a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}"><span>{{ entry.domainName|removeWww }}</span></a></li>
64f81bc3
TC
67 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">check</i><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>
68 <li><a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">star_rate</i><span>{{ 'entry.list.toogle_as_star'|trans }}</span></a></li>
fa0f5ee1 69 <li><a title="{{ 'entry.list.delete'|trans }}" class="tool icon" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons md-24 vertical-align-middle">delete</i><span>{{ 'entry.list.delete'|trans }}</span></a></li>
0d42217e 70 </ul>
9aa99128 71 {% if (entry.previewPicture is null or listMode == 1) %}
1d4d9aaf
TC
72 <ul class="card-entry-tags">
73 {% for tag in entry.tags %}
645c0d5b 74 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
1d4d9aaf
TC
75 {% endfor %}
76 </ul>
9aa99128 77 <p {% if listMode == 1 %}class="hide"{% endif %}>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
0d42217e 78 {% else %}
1d4d9aaf
TC
79 <ul class="card-entry-labels">
80 {% for tag in entry.tags | slice(0, 3) %}
645c0d5b 81 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
1d4d9aaf
TC
82 {% endfor %}
83 </ul>
3d995079 84 <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|e|raw }}" />
0d42217e
JB
85 {% endif %}
86 </div>
87 {% endfor %}
5def3f58 88
817724a7
JB
89 {% if entries.getNbPages > 1 %}
90 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
91 {% endif %}
92
5ecdfcd0
TC
93 <!-- Export -->
94 <aside id="download-form">
bde23a44 95 {% set currentTag = null %}
920d8859
NL
96 {% if tag is defined %}
97 {% set currentTag = tag %}
5ecdfcd0
TC
98 {% endif %}
99 <h2>{{ 'entry.list.export_title'|trans }}</h2>
100 <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">&times;</a>
101 <ul>
920d8859
NL
102 {% 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 %}
103 {% 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 %}
104 {% 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 %}
bb8ad42b
EC
105 {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json', 'tag' : currentTag }) }}">JSON</a></li>{% endif %}
106 {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv', 'tag' : currentTag }) }}">CSV</a></li>{% endif %}
920d8859
NL
107 {% 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 %}
108 {% 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 %}
5ecdfcd0
TC
109 </ul>
110 </aside>
371bcca0 111
5ecdfcd0 112 <!-- Filter -->
371bcca0 113 {% if form is not null %}
817724a7 114 <div id="filters">
5def3f58 115 <form method="get" action="{{ path('all') }}">
0d42217e 116 <h2>{{ 'entry.filters.title'|trans }}</h2>
5def3f58
JB
117 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
118
119 <div id="filter-status" class="filter-group">
d8e961bd
LD
120 {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %}
121 <div class="">
122 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}})</a>
123 </div>
124 {% endif %}
125
5def3f58 126 <div class="">
0d42217e 127 <label>{{ 'entry.filters.status_label'|trans }}</label>
5def3f58
JB
128 </div>
129 <div class="input-field">
130 {{ form_widget(form.isArchived) }}
0d42217e 131 {{ form_label(form.isArchived) }}
5def3f58
JB
132 </div>
133
134 <div class="input-field">
135 {{ form_widget(form.isStarred) }}
0d42217e 136 {{ form_label(form.isStarred) }}
5def3f58 137 </div>
5e98404d 138
5ecdfcd0
TC
139 <div class="input-field">
140 {{ form_widget(form.isUnread) }}
141 {{ form_label(form.isUnread) }}
142 </div>
143
5e98404d
JB
144 <div class="input-field">
145 {{ form_widget(form.previewPicture) }}
0d42217e 146 {{ form_label(form.previewPicture) }}
5e98404d 147 </div>
e8911f7c
JB
148
149 <div class="input-field">
150 {{ form_widget(form.isPublic) }}
151 {{ form_label(form.isPublic) }}
152 </div>
5def3f58 153 </div>
d4ebe5c5
JB
154
155 <div id="filter-language" class="filter-group">
0d42217e 156 {{ form_label(form.language) }}
d4ebe5c5
JB
157 <div class="input-field ">
158 {{ form_widget(form.language) }}
159 </div>
160 </div>
161
10b35097
NL
162 <div id="filter-http-status" class="filter-group">
163 {{ form_label(form.httpStatus) }}
164 <div class="input-field ">
165 {{ form_widget(form.httpStatus) }}
166 </div>
167 </div>
168
5def3f58
JB
169 <div id="filter-reading-time" class="filter-group">
170 <div class="">
0d42217e 171 {{ form_label(form.readingTime) }}
5def3f58
JB
172 </div>
173 <div class="input-field ">
0d42217e 174 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
5e98404d 175 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
5def3f58
JB
176 </div>
177 <div class="input-field ">
0d42217e 178 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
5def3f58
JB
179 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
180 </div>
181 </div>
182
183 <div id="filter-domain-name" class="filter-group">
0d42217e 184 {{ form_label(form.domainName) }}
5def3f58
JB
185 <div class="input-field ">
186 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
187 </div>
188 </div>
189
190 <div id="filter-creation-date" class="filter-group">
191 <div class="">
0d42217e 192 {{ form_label(form.createdAt) }}
5def3f58
JB
193 </div>
194 <div class="input-field ">
0d42217e 195 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
5def3f58
JB
196 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
197 </div>
198 <div class="input-field ">
0d42217e 199 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
5def3f58
JB
200 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
201 </div>
202 </div>
5def3f58 203
0d42217e 204 <div id="filter-buttons" class="filter-group">
5def3f58 205 <div class="">
0d42217e 206 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
5def3f58
JB
207 </div>
208
0d42217e
JB
209 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
210 </div>
5def3f58 211 </form>
c146f694 212 </div>
371bcca0 213 {% endif %}
9d50517c 214{% endblock %}