]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Move icon into the top menu bar
[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() }}
5 {% if tag is defined and app.user.config.rssToken %}
6 <link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" />
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>
bd40f1af
TC
31 {% if app.user.config.rssToken %}
32 {% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
33 {% endif %}
50f35f0d
JB
34 {% if currentRoute in ['unread', 'starred', 'archive', 'untagged', 'all'] %}
35 <a href="{{ path('random_entry', { 'type': currentRoute }) }}"><i class="btn-clickable material-icons md-24 js-random-action">shuffle</i></a>
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
NL
48
49 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
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">
120 <div class="">
0d42217e 121 <label>{{ 'entry.filters.status_label'|trans }}</label>
5def3f58
JB
122 </div>
123 <div class="input-field">
124 {{ form_widget(form.isArchived) }}
0d42217e 125 {{ form_label(form.isArchived) }}
5def3f58
JB
126 </div>
127
128 <div class="input-field">
129 {{ form_widget(form.isStarred) }}
0d42217e 130 {{ form_label(form.isStarred) }}
5def3f58 131 </div>
5e98404d 132
5ecdfcd0
TC
133 <div class="input-field">
134 {{ form_widget(form.isUnread) }}
135 {{ form_label(form.isUnread) }}
136 </div>
137
5e98404d
JB
138 <div class="input-field">
139 {{ form_widget(form.previewPicture) }}
0d42217e 140 {{ form_label(form.previewPicture) }}
5e98404d 141 </div>
e8911f7c
JB
142
143 <div class="input-field">
144 {{ form_widget(form.isPublic) }}
145 {{ form_label(form.isPublic) }}
146 </div>
5def3f58 147 </div>
d4ebe5c5
JB
148
149 <div id="filter-language" class="filter-group">
0d42217e 150 {{ form_label(form.language) }}
d4ebe5c5
JB
151 <div class="input-field ">
152 {{ form_widget(form.language) }}
153 </div>
154 </div>
155
10b35097
NL
156 <div id="filter-http-status" class="filter-group">
157 {{ form_label(form.httpStatus) }}
158 <div class="input-field ">
159 {{ form_widget(form.httpStatus) }}
160 </div>
161 </div>
162
5def3f58
JB
163 <div id="filter-reading-time" class="filter-group">
164 <div class="">
0d42217e 165 {{ form_label(form.readingTime) }}
5def3f58
JB
166 </div>
167 <div class="input-field ">
0d42217e 168 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
5e98404d 169 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
5def3f58
JB
170 </div>
171 <div class="input-field ">
0d42217e 172 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
5def3f58
JB
173 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
174 </div>
175 </div>
176
177 <div id="filter-domain-name" class="filter-group">
0d42217e 178 {{ form_label(form.domainName) }}
5def3f58
JB
179 <div class="input-field ">
180 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
181 </div>
182 </div>
183
184 <div id="filter-creation-date" class="filter-group">
185 <div class="">
0d42217e 186 {{ form_label(form.createdAt) }}
5def3f58
JB
187 </div>
188 <div class="input-field ">
0d42217e 189 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
5def3f58
JB
190 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
191 </div>
192 <div class="input-field ">
0d42217e 193 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
5def3f58
JB
194 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
195 </div>
196 </div>
5def3f58 197
0d42217e 198 <div id="filter-buttons" class="filter-group">
5def3f58 199 <div class="">
0d42217e 200 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
5def3f58
JB
201 </div>
202
0d42217e
JB
203 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
204 </div>
5def3f58 205 </form>
c146f694 206 </div>
371bcca0 207 {% endif %}
9d50517c 208{% endblock %}