]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
add filter on domain name
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
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 </ul>
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">&lt;</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
81 <div class="col s12">
82
83 <label>{% trans %}Create at{% endtrans %}</label>
84
85 <label>{% trans %}Domain name{% endtrans %}</label>
86 </div>
87 <div class="input-field col s6">
88 {{ form_widget(form.domainName, {'type': 'text'}) }}
89 <label for="entry_filter_domainName">{% trans %}www.website.com{% endtrans %}</label>
90 </div>
91
92 <div class="input-field col s6">
93 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
94 <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label>
95 </div>
96 <div class="input-field col s6">
97 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
98 <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label>
99 </div>
100
101 <div class="col s6">
102 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a>
103 </div>
104
105 <div class="col s6">
106 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button>
107 </div>
108
109 </div>
110
111 </form>
112 </div>
113 {% endblock %}