]>
Commit | Line | Data |
---|---|---|
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) }}…</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">×</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">×</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-reading-time" class="filter-group"> | |
135 | <div class=""> | |
136 | {{ form_label(form.readingTime) }} | |
137 | </div> | |
138 | <div class="input-field "> | |
139 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> | |
140 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
141 | </div> | |
142 | <div class="input-field "> | |
143 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> | |
144 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
145 | </div> | |
146 | </div> | |
147 | ||
148 | <div id="filter-domain-name" class="filter-group"> | |
149 | {{ form_label(form.domainName) }} | |
150 | <div class="input-field "> | |
151 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | |
152 | </div> | |
153 | </div> | |
154 | ||
155 | <div id="filter-creation-date" class="filter-group"> | |
156 | <div class=""> | |
157 | {{ form_label(form.createdAt) }} | |
158 | </div> | |
159 | <div class="input-field "> | |
160 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> | |
161 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | |
162 | </div> | |
163 | <div class="input-field "> | |
164 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> | |
165 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | |
166 | </div> | |
167 | </div> | |
168 | ||
169 | <div id="filter-buttons" class="filter-group"> | |
170 | <div class=""> | |
171 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> | |
172 | </div> | |
173 | ||
174 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> | |
175 | </div> | |
176 | </form> | |
177 | </div> | |
178 | {% endif %} | |
179 | {% endblock %} |