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