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