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