aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-18 14:29:10 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-18 14:29:10 +0200
commit54f2b4a254345a58cd03b872bd772863855c7f1f (patch)
tree33a10211d6a6393bff23063677a4feac7eccc333 /src/Wallabag
parent3162601c59cb07615afeebc007e157ca64c658c7 (diff)
parent428af5a8c368f27ef7f1027a6bbd37b6f9cded60 (diff)
downloadwallabag-54f2b4a254345a58cd03b872bd772863855c7f1f.tar.gz
wallabag-54f2b4a254345a58cd03b872bd772863855c7f1f.tar.zst
wallabag-54f2b4a254345a58cd03b872bd772863855c7f1f.zip
Merge pull request #1353 from wallabag/v2-pluriel
check if one entry or not
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig86
1 files changed, 36 insertions, 50 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 8fc6e8f6..d6dd7c37 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -15,52 +15,46 @@
15 15
16{% block content %} 16{% block content %}
17 {% block pager %} 17 {% block pager %}
18 {% if entries is not empty %} 18 <div class="results clearfix">
19 <div class="results clearfix"> 19 <div class="nb-results left">{% transchoice entries.count %}{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.{% endtranschoice %}</div>
20 <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div> 20 <ul class="pagination right">
21 <ul class="pagination right"> 21 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
22 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} 22 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
23 <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> 23 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
24 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a> 24 </li>
25 </li> 25 {% endfor %}
26 {% endfor %}
27 </div>
28 </div> 26 </div>
29 {% endif %} 27 </div>
30 {% endblock %} 28 {% endblock %}
31<br> 29 <br />
32 {% if entries is empty %} 30 <ul class="row data">
33 <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> 31 {% for entry in entries %}
34 {% else %} 32 <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12">
35 <ul class="row data"> 33 <div class="card">
36 {% for entry in entries %} 34 <div class="card-content">
37 <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> 35 <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
38 <div class="card"> 36 {% if entry.readingTime > 0 %}
39 <div class="card-content"> 37 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div>
40 <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> 38 {% else %}
41 {% if entry.readingTime > 0 %} 39 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
42 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div> 40 {% endif %}
43 {% else %} 41 <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
44 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div> 42 </div>
45 {% endif %} 43 <div class="card-action">
46 <p>{{ entry.content|striptags|slice(0, 300) }}...</p> 44 <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.domainName }}</span></a></bold>
47 </div>
48 <div class="card-action">
49 <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.domainName }}</span></a></bold>
50 45
51 <ul class="tools links right"> 46 <ul class="tools links right">
52 <li> 47 <li>
53 <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a> 48 <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a>
54 <a title="{% trans %}toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a> 49 <a title="{% trans %}toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a>
55 <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> 50 <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
56 </li> 51 </li>
57 </ul> 52 </ul>
58 </div>
59 </div> 53 </div>
60 </li> 54 </div>
61 {% endfor %} 55 </li>
62 </ul> 56 {% endfor %}
63 {% endif %} 57 </ul>
64 58
65 59
66 <!-- Filters --> 60 <!-- Filters -->
@@ -86,14 +80,6 @@
86 <div class="col s12"> 80 <div class="col s12">
87 <label>{% trans %}Create at{% endtrans %}</label> 81 <label>{% trans %}Create at{% endtrans %}</label>
88 </div> 82 </div>
89 <div class="input-field col s6">
90 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
91 <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label>
92 </div>
93 <div class="input-field col s6">
94 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
95 <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label>
96 </div>
97 83
98 <div class="col s6"> 84 <div class="col s6">
99 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a> 85 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a>