diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 78 |
1 files changed, 36 insertions, 42 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 cb34c3f3..b2e2e8d0 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 %}entrie{% endtrans %}{% if entries.nbPages > 1 %}s{% endif %}</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"><</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"><</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 --> |