]>
Commit | Line | Data |
---|---|---|
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | |
2 | ||
3 | {% block title %} | |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | |
5 | ||
6 | {% if currentRoute == 'starred' %} | |
7 | {% trans %}Starred{% endtrans %} | |
8 | {% elseif currentRoute == 'archive' %} | |
9 | {% trans %}Archive{% endtrans %} | |
10 | {% else %} | |
11 | {% trans %}Unread{% endtrans %} | |
12 | {% endif %} | |
13 | ||
14 | {% endblock %} | |
15 | ||
16 | {% block content %} | |
17 | {% block pager %} | |
18 | <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 | <ul class="pagination right"> | |
21 | {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} | |
22 | <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 | </li> | |
25 | {% endfor %} | |
26 | </div> | |
27 | </div> | |
28 | {% endblock %} | |
29 | <br /> | |
30 | <ul class="row data"> | |
31 | {% for entry in entries %} | |
32 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | |
33 | <div class="card"> | |
34 | <div class="card-content"> | |
35 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | |
36 | {% if entry.readingTime > 0 %} | |
37 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div> | |
38 | {% else %} | |
39 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | |
40 | {% endif %} | |
41 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | |
42 | </div> | |
43 | <div class="card-action"> | |
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> | |
45 | ||
46 | <ul class="tools links right"> | |
47 | <li> | |
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> | |
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> | |
50 | <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | |
51 | </li> | |
52 | </ul> | |
53 | </div> | |
54 | </div> | |
55 | </li> | |
56 | {% endfor %} | |
57 | </ul> | |
58 | ||
59 | ||
60 | <!-- Filters --> | |
61 | <div id="filters" class="side-nav fixed right-aligned"> | |
62 | <form> | |
63 | ||
64 | <h4 class="center">{% trans %}Filters{% endtrans %}</h1> | |
65 | ||
66 | <div class="row"> | |
67 | ||
68 | <div class="col s12"> | |
69 | <label>{% trans %}Reading time in minutes{% endtrans %}</label> | |
70 | </div> | |
71 | <div class="input-field col s6"> | |
72 | {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} | |
73 | <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label> | |
74 | </div> | |
75 | <div class="input-field col s6"> | |
76 | {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} | |
77 | <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label> | |
78 | </div> | |
79 | ||
80 | <div class="col s12"> | |
81 | <label>{% trans %}Create at{% endtrans %}</label> | |
82 | </div> | |
83 | ||
84 | <div class="col s6"> | |
85 | <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a> | |
86 | </div> | |
87 | ||
88 | <div class="col s6"> | |
89 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button> | |
90 | </div> | |
91 | ||
92 | </div> | |
93 | ||
94 | </form> | |
95 | </div> | |
96 | {% endblock %} |