]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
Merge pull request #2659 from akovalyov/bugfix/non-latin-characters-in-reading-time...
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / 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 <div class="results clearfix">
16 <div class="nb-results left">
17 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
18 </div>
19 {% if entries.getNbPages > 1 %}
20 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
21 {% endif %}
22 </div>
23
24 <br />
25 <ul class="row data">
26 {% for entry in entries %}
27 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
28 {% if entry.previewPicture is null %}
29 {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
30 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
31 {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %}
32 {% elseif not entry.previewPicture is null %}
33 {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %}
34 {% endif %}
35 </li>
36 {% endfor %}
37 </ul>
38
39 {% if entries.getNbPages > 1 %}
40 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
41 {% endif %}
42
43 <!-- Export -->
44 <div id="export" class="side-nav fixed right-aligned">
45 {% set currentRoute = app.request.attributes.get('_route') %}
46 {% set currentTag = '' %}
47 {% if tag is defined %}
48 {% set currentTag = tag %}
49 {% endif %}
50 {% if currentRoute == 'homepage' %}
51 {% set currentRoute = 'unread' %}
52 {% endif %}
53 <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4>
54 <ul>
55 {% 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 %}
56 {% 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 %}
57 {% 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 %}
58 {% 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 %}
59 {% 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 %}
60 {% 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 %}
61 {% 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 %}
62 </ul>
63 </div>
64
65 <!-- Filters -->
66 {% if form is not null %}
67 <div id="filters" class="side-nav fixed right-aligned">
68 <form action="{{ path('all') }}">
69
70 <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
71
72 <div class="row">
73 <div class="col s12">
74 <label>{{ 'entry.filters.status_label'|trans }}</label>
75 </div>
76
77 <div class="input-field col s6 with-checkbox">
78 {{ form_widget(form.isArchived) }}
79 {{ form_label(form.isArchived) }}
80 </div>
81
82 <div class="input-field col s6 with-checkbox">
83 {{ form_widget(form.isStarred) }}
84 {{ form_label(form.isStarred) }}
85 </div>
86
87 <div class="input-field col s6 with-checkbox">
88 {{ form_widget(form.isUnread) }}
89 {{ form_label(form.isUnread) }}
90 </div>
91
92 <div class="col s12">
93 <label>{{ 'entry.filters.preview_picture_help'|trans }}</label>
94 </div>
95
96 <div class="input-field col s12 with-checkbox">
97 {{ form_widget(form.previewPicture) }}
98 {{ form_label(form.previewPicture) }}
99 </div>
100
101 <div class="col s12">
102 {{ form_label(form.language) }}
103 </div>
104
105 <div class="input-field col s12">
106 {{ form_widget(form.language) }}
107 </div>
108
109 <div class="col s12">
110 {{ form_label(form.httpStatus) }}
111 </div>
112
113 <div class="input-field col s12">
114 {{ form_widget(form.httpStatus) }}
115 </div>
116
117 <div class="col s12">
118 {{ form_label(form.readingTime) }}
119 </div>
120 <div class="input-field col s6">
121 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
122 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
123 </div>
124 <div class="input-field col s6">
125 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
126 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
127 </div>
128
129 <div class="input-field col s12">
130 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
131 {{ form_label(form.domainName) }}
132 </div>
133
134 <div class="col s12">
135 {{ form_label(form.createdAt) }}
136 </div>
137
138 <div class="input-field col s6">
139 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
140 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
141 </div>
142 <div class="input-field col s6">
143 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
144 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
145 </div>
146
147 <div class="col s6">
148 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
149 </div>
150
151 <div class="col s6">
152 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
153 </div>
154 </div>
155
156 </form>
157 </div>
158 {% endif %}
159
160 {% endblock %}