aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-08-24 20:43:29 +0200
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-09-13 13:35:12 +0200
commitd2fcbf5d846eabb89714f4c59ff6729e2666a948 (patch)
treed6a9267da308f76c2e6377f50744f7a5216cf53d /src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
parent19c283140ef7f489c67d7debe4dd431e7cfefd4b (diff)
downloadwallabag-d2fcbf5d846eabb89714f4c59ff6729e2666a948.tar.gz
wallabag-d2fcbf5d846eabb89714f4c59ff6729e2666a948.tar.zst
wallabag-d2fcbf5d846eabb89714f4c59ff6729e2666a948.zip
Handle filter form using some JS
Instead of displaying an ugly form
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
index 0d295431..28bf0ab9 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
@@ -4,24 +4,34 @@
4 4
5{% block content %} 5{% block content %}
6 {% block pager %} 6 {% block pager %}
7 {% if entries is not empty %}
8 <div class="results"> 7 <div class="results">
9 <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div> 8 <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
10 <div class="pagination"> 9 <div class="pagination">
11 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} 10 <a href="#" id="filter">{% trans %}Filter{% endtrans %}</a>
12 <li> 11 {% if entries is not empty %}
13 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a> 12
14 </li> 13 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
15 {% endfor %} 14 <li>
15 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
16 </li>
17 {% endfor %}
18 {% endif %}
16 </div> 19 </div>
17 </div> 20 </div>
18 {% endif %}
19 {% endblock %} 21 {% endblock %}
20 22
23 <div id="filter-form" class="messages info popup-form">
24 <form method="get" action="{{ path('all') }}">
25 <h2>{% trans %}Filter{% endtrans %}</h2>
26 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
27 {{ form_rest(form) }}
28 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button>
29 </form>
30 </div>
31
21 {% if entries is empty %} 32 {% if entries is empty %}
22 <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> 33 <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
23 {% else %} 34 {% else %}
24 <div><form action="{{ path('all') }}">{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div>
25 {% for entry in entries %} 35 {% for entry in entries %}
26 <div id="entry-{{ entry.id|e }}" class="entry"> 36 <div id="entry-{{ entry.id|e }}" class="entry">
27 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> 37 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>