]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
fix #1283: display the good title for each category
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
CommitLineData
53e12188
AD
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
b1a65df9
NL
3{% block title %}
4 {% set currentRoute = app.request.attributes.get('_route') %}
5
6 {% if currentRoute == 'unread' %}
7 {% trans %}Unread{% endtrans %}
8 {% elseif currentRoute == 'starred' %}
9 {% trans %}Starred{% endtrans %}
10 {% elseif currentRoute == 'archive' %}
11 {% trans %}Archive{% endtrans %}
12 {% endif %}
13
14{% endblock %}
53e12188
AD
15
16{% block content %}
17 {% block pager %}
18 {% if entries is not empty %}
19 <div class="results clearfix">
20 <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
21 <ul class="pagination right">
22 {% for p in range(1, entries.nbPages) %}
23 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
24 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a>
25 </li>
26 {% endfor %}
27 </div>
28 </div>
29 {% endif %}
30 {% endblock %}
31<br>
32 {% if entries is empty %}
33 <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
34 {% else %}
35 <ul class="row">
36 {% for entry in entries %}
37 <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12">
38 <div class="card">
39 <div class="card-content">
40 <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
41 {% if entry.content| readingTime > 0 %}
42 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.content| readingTime }} min</span></div>
43 {% else %}
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>
45 {% endif %}
46 <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
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.url | e | domainName }}</span></a></bold>
50
51 <ul class="tools links right">
52 <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>
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>
55 <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
56 </li>
57 </ul>
58 </div>
59 </div>
60 </li>
61 {% endfor %}
62 </ul>
63 {% endif %}
64{% endblock %}