aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig8
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php22
4 files changed, 32 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
index 539c035f..a794df0e 100644
--- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
@@ -10,7 +10,7 @@
10 <div class="pagination"> 10 <div class="pagination">
11 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} 11 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
12 <li> 12 <li>
13 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a> 13 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
14 </li> 14 </li>
15 {% endfor %} 15 {% endfor %}
16 </div> 16 </div>
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 9862b579..d0ebdad6 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
@@ -21,7 +21,7 @@
21 <ul class="pagination right"> 21 <ul class="pagination right">
22 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} 22 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
23 <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> 23 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
24 <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a> 24 <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
25 </li> 25 </li>
26 {% endfor %} 26 {% endfor %}
27 </div> 27 </div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
index 2aa9d1b8..b92c41b6 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
@@ -43,6 +43,14 @@
43 <div class="collapsible-body"></div> 43 <div class="collapsible-body"></div>
44 </li> 44 </li>
45 45
46 <li class="bold border-bottom hide-on-med-and-down">
47 <a class="waves-effect collapsible-header" href="{{ entry.url|e }}">
48 <i class="mdi-content-link small"></i>
49 <span>{% trans %}original article{% endtrans %}</span>
50 </a>
51 <div class="collapsible-body"></div>
52 </li>
53
46 <li class="bold hide-on-med-and-down"> 54 <li class="bold hide-on-med-and-down">
47 <a class="waves-effect collapsible-header" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> 55 <a class="waves-effect collapsible-header" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
48 <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i> 56 <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i>
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 24848eb2..0bd18c44 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -259,4 +259,26 @@ class EntryControllerTest extends WallabagCoreTestCase
259 259
260 $this->assertCount(1, $crawler->filter('div[class=entry]')); 260 $this->assertCount(1, $crawler->filter('div[class=entry]'));
261 } 261 }
262
263 public function testPaginationWithFilter()
264 {
265 $this->logInAs('admin');
266 $client = $this->getClient();
267
268 $crawler = $client->request('GET', '/config');
269
270 $form = $crawler->filter('button[id=config_save]')->form();
271
272 $data = array(
273 'config[items_per_page]' => '1',
274 );
275
276 $client->submit($form, $data);
277
278 $parameters = '?entry_filter%5BreadingTime%5D%5Bleft_number%5D=&amp;entry_filter%5BreadingTime%5D%5Bright_number%5D=';
279
280 $crawler = $client->request('GET', 'unread/list'.$parameters);
281
282 $this->assertContains($parameters, $client->getResponse()->getContent());
283 }
262} 284}