diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig | 101 |
1 files changed, 47 insertions, 54 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 7271bdaa..22f456da 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig | |||
@@ -1,13 +1,13 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title "Unread" %} | 3 | {% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | {% block pager %} | 6 | {% block pager %} |
7 | <div class="results"> | 7 | <div class="results"> |
8 | <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div> | 8 | <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> |
9 | <div class="pagination"> | 9 | <div class="pagination"> |
10 | <a href="#" id="filter">{% trans %}Filter{% endtrans %}</a> | 10 | <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a> |
11 | {% if entries is not empty %} | 11 | {% if entries is not empty %} |
12 | – | 12 | – |
13 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} | 13 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} |
@@ -20,68 +20,62 @@ | |||
20 | </div> | 20 | </div> |
21 | {% endblock %} | 21 | {% endblock %} |
22 | 22 | ||
23 | {% if entries is empty %} | 23 | {% for entry in entries %} |
24 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | 24 | <div id="entry-{{ entry.id|e }}" class="entry"> |
25 | {% else %} | 25 | <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> |
26 | {% for entry in entries %} | 26 | |
27 | <div id="entry-{{ entry.id|e }}" class="entry"> | 27 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
28 | <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> | 28 | <div class="estimatedTime"> |
29 | {% if entry.readingTime > 0 %} | 29 | <span class="tool reading-time"> |
30 | <div class="estimatedTime"> | 30 | {% if readingTime > 0 %} |
31 | <span class="tool reading-time"> | 31 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }} |
32 | {% trans with {'%readingTime%': entry.readingTime } %}estimated reading time: %readingTime% min{% endtrans %} | 32 | {% else %} |
33 | </span> | 33 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} |
34 | </div> | 34 | {% endif %} |
35 | {% else %} | 35 | </span> |
36 | <div class="estimatedTime"> | ||
37 | <span class="tool reading-time"> | ||
38 | {% trans with {'%inferior%': '<small class="inferieur"><</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %} | ||
39 | </span> | ||
40 | </div> | ||
41 | {% endif %} | ||
42 | |||
43 | <ul class="tools links"> | ||
44 | <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> | ||
45 | <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li> | ||
46 | <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li> | ||
47 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li> | ||
48 | </ul> | ||
49 | {% if entry.previewPicture is null %} | ||
50 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | ||
51 | {% else %} | ||
52 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> | ||
53 | {% endif %} | ||
54 | </div> | 36 | </div> |
55 | {% endfor %} | 37 | |
56 | {% endif %} | 38 | <ul class="tools links"> |
39 | <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> | ||
40 | <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> | ||
41 | <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> | ||
42 | <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> | ||
43 | </ul> | ||
44 | {% if entry.previewPicture is null %} | ||
45 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | ||
46 | {% else %} | ||
47 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> | ||
48 | {% endif %} | ||
49 | </div> | ||
50 | {% endfor %} | ||
57 | 51 | ||
58 | <aside id="filter-form" class=""> | 52 | <aside id="filter-form" class=""> |
59 | <form method="get" action="{{ path('all') }}"> | 53 | <form method="get" action="{{ path('all') }}"> |
60 | <h2>{% trans %}Filters{% endtrans %}</h2> | 54 | <h2>{{ 'entry.filters.title'|trans }}</h2> |
61 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | 55 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> |
62 | 56 | ||
63 | <div id="filter-status" class="filter-group"> | 57 | <div id="filter-status" class="filter-group"> |
64 | <div class=""> | 58 | <div class=""> |
65 | <label>{% trans %}Status{% endtrans %}</label> | 59 | <label>{{ 'entry.filters.status_label'|trans }}</label> |
66 | </div> | 60 | </div> |
67 | <div class="input-field"> | 61 | <div class="input-field"> |
68 | {{ form_widget(form.isArchived) }} | 62 | {{ form_widget(form.isArchived) }} |
69 | <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label> | 63 | {{ form_label(form.isArchived) }} |
70 | </div> | 64 | </div> |
71 | 65 | ||
72 | <div class="input-field"> | 66 | <div class="input-field"> |
73 | {{ form_widget(form.isStarred) }} | 67 | {{ form_widget(form.isStarred) }} |
74 | <label for="entry_filter_isStarred">{% trans %}Starred{% endtrans %}</label> | 68 | {{ form_label(form.isStarred) }} |
75 | </div> | 69 | </div> |
76 | 70 | ||
77 | <div class="input-field"> | 71 | <div class="input-field"> |
78 | {{ form_widget(form.previewPicture) }} | 72 | {{ form_widget(form.previewPicture) }} |
79 | <label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label> | 73 | {{ form_label(form.previewPicture) }} |
80 | </div> | 74 | </div> |
81 | </div> | 75 | </div> |
82 | 76 | ||
83 | <div id="filter-language" class="filter-group"> | 77 | <div id="filter-language" class="filter-group"> |
84 | <label for="entry_filter_language">{% trans %}Language{% endtrans %}</label> | 78 | {{ form_label(form.language) }} |
85 | <div class="input-field "> | 79 | <div class="input-field "> |
86 | {{ form_widget(form.language) }} | 80 | {{ form_widget(form.language) }} |
87 | </div> | 81 | </div> |
@@ -89,20 +83,20 @@ | |||
89 | 83 | ||
90 | <div id="filter-reading-time" class="filter-group"> | 84 | <div id="filter-reading-time" class="filter-group"> |
91 | <div class=""> | 85 | <div class=""> |
92 | <label>{% trans %}Reading time in minutes{% endtrans %}</label> | 86 | {{ form_label(form.readingTime) }} |
93 | </div> | 87 | </div> |
94 | <div class="input-field "> | 88 | <div class="input-field "> |
95 | <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label> | 89 | <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label> |
96 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | 90 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} |
97 | </div> | 91 | </div> |
98 | <div class="input-field "> | 92 | <div class="input-field "> |
99 | <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label> | 93 | <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label> |
100 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | 94 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} |
101 | </div> | 95 | </div> |
102 | </div> | 96 | </div> |
103 | 97 | ||
104 | <div id="filter-domain-name" class="filter-group"> | 98 | <div id="filter-domain-name" class="filter-group"> |
105 | <label for="entry_filter_domainName">{% trans %}Domain name{% endtrans %}</label> | 99 | {{ form_label(form.domainName) }} |
106 | <div class="input-field "> | 100 | <div class="input-field "> |
107 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} | 101 | {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} |
108 | </div> | 102 | </div> |
@@ -110,26 +104,25 @@ | |||
110 | 104 | ||
111 | <div id="filter-creation-date" class="filter-group"> | 105 | <div id="filter-creation-date" class="filter-group"> |
112 | <div class=""> | 106 | <div class=""> |
113 | <label>{% trans %}Creation date{% endtrans %}</label> | 107 | {{ form_label(form.createdAt) }} |
114 | </div> | 108 | </div> |
115 | <div class="input-field "> | 109 | <div class="input-field "> |
116 | <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label> | 110 | <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label> |
117 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} | 111 | {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} |
118 | </div> | 112 | </div> |
119 | <div class="input-field "> | 113 | <div class="input-field "> |
120 | <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label> | 114 | <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label> |
121 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} | 115 | {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} |
122 | </div> | 116 | </div> |
123 | </div> | 117 | </div> |
124 | <div id="filter-buttons" class="filter-group"> | ||
125 | 118 | ||
119 | <div id="filter-buttons" class="filter-group"> | ||
126 | <div class=""> | 120 | <div class=""> |
127 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a> | 121 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a> |
128 | </div> | 122 | </div> |
129 | 123 | ||
130 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filters{% endtrans %}</button> | 124 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> |
131 | 125 | </div> | |
132 | </div> | ||
133 | </form> | 126 | </form> |
134 | </aside> | 127 | </aside> |
135 | 128 | ||