]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
1 {% extends "WallabagCoreBundle::layout.html.twig" %}
2
3 {% block title %}
4 {% set filter = '' %}
5 {% if tag is defined %}
6 {% set filter = tag %}
7 {% endif %}
8 {% if searchTerm is defined and searchTerm is not empty %}
9 {% set filter = searchTerm %}
10 {% endif %}
11 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %}
12 {% endblock %}
13
14 {% block content %}
15
16 <div class="results">
17 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
18 <div class="pagination">
19 <i class="btn-clickable download-btn material-icons md-36">file_download</i>
20 <i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
21 {% if entries.getNbPages > 1 %}
22 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
23 {% endif %}
24 </div>
25 </div>
26
27 {% for entry in entries %}
28 <div id="entry-{{ entry.id|e }}" class="entry">
29 <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
30
31 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
32 <div class="estimatedTime">
33 <span class="tool reading-time">
34 {% if readingTime > 0 %}
35 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
36 {% else %}
37 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
38 {% endif %}
39 </span>
40 <span class="tool created-at">
41 <i class="tool icon icon-calendar" title="{{ 'entry.view.created_at'|trans }}">
42 {{ entry.createdAt|date('Y-m-d') }}
43 </i>
44 </span>
45 </div>
46
47 <ul class="tools links">
48 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>
49 <li><a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_star'|trans }}</span></a></li>
50 <li><a title="{{ 'entry.list.delete'|trans }}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.delete'|trans }}</span></a></li>
51 <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
52 </ul>
53 {% if entry.previewPicture is null %}
54 <ul class="card-entry-tags">
55 {% for tag in entry.tags %}
56 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
57 {% endfor %}
58 </ul>
59 <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
60 {% else %}
61 <ul class="card-entry-labels">
62 {% for tag in entry.tags | slice(0, 3) %}
63 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
64 {% endfor %}
65 </ul>
66 <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />
67 {% endif %}
68 </div>
69 {% endfor %}
70
71 {% if entries.getNbPages > 1 %}
72 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
73 {% endif %}
74
75 <!-- Export -->
76 <aside id="download-form">
77 {% set currentRoute = app.request.attributes.get('_route') %}
78 {% set currentTag = '' %}
79 {% if tag is defined %}
80 {% set currentTag = tag %}
81 {% endif %}
82 {% if currentRoute == 'homepage' %}
83 {% set currentRoute = 'unread' %}
84 {% endif %}
85 <h2>{{ 'entry.list.export_title'|trans }}</h2>
86 <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">&times;</a>
87 <ul>
88 {% 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 %}
89 {% 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 %}
90 {% 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 %}
91 {% 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 %}
92 {% 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 %}
93 {% 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 %}
94 {% 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 %}
95 </ul>
96 </aside>
97
98 <!-- Filter -->
99 {% if form is not null %}
100 <div id="filters">
101 <form method="get" action="{{ path('all') }}">
102 <h2>{{ 'entry.filters.title'|trans }}</h2>
103 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
104
105 <div id="filter-status" class="filter-group">
106 <div class="">
107 <label>{{ 'entry.filters.status_label'|trans }}</label>
108 </div>
109 <div class="input-field">
110 {{ form_widget(form.isArchived) }}
111 {{ form_label(form.isArchived) }}
112 </div>
113
114 <div class="input-field">
115 {{ form_widget(form.isStarred) }}
116 {{ form_label(form.isStarred) }}
117 </div>
118
119 <div class="input-field">
120 {{ form_widget(form.isUnread) }}
121 {{ form_label(form.isUnread) }}
122 </div>
123
124 <div class="input-field">
125 {{ form_widget(form.previewPicture) }}
126 {{ form_label(form.previewPicture) }}
127 </div>
128 </div>
129
130 <div id="filter-language" class="filter-group">
131 {{ form_label(form.language) }}
132 <div class="input-field ">
133 {{ form_widget(form.language) }}
134 </div>
135 </div>
136
137 <div id="filter-http-status" class="filter-group">
138 {{ form_label(form.httpStatus) }}
139 <div class="input-field ">
140 {{ form_widget(form.httpStatus) }}
141 </div>
142 </div>
143
144 <div id="filter-reading-time" class="filter-group">
145 <div class="">
146 {{ form_label(form.readingTime) }}
147 </div>
148 <div class="input-field ">
149 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
150 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
151 </div>
152 <div class="input-field ">
153 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
154 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
155 </div>
156 </div>
157
158 <div id="filter-domain-name" class="filter-group">
159 {{ form_label(form.domainName) }}
160 <div class="input-field ">
161 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
162 </div>
163 </div>
164
165 <div id="filter-creation-date" class="filter-group">
166 <div class="">
167 {{ form_label(form.createdAt) }}
168 </div>
169 <div class="input-field ">
170 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
171 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
172 </div>
173 <div class="input-field ">
174 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
175 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
176 </div>
177 </div>
178
179 <div id="filter-buttons" class="filter-group">
180 <div class="">
181 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
182 </div>
183
184 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
185 </div>
186 </form>
187 </div>
188 {% endif %}
189 {% endblock %}