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