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