Merge pull request #1530 from ArthurHoaro/fix/untagged-only-broken
Fix broken route to filter not tagged bookmarks
This commit is contained in:
commit
0e60b7f174
4 changed files with 31 additions and 29 deletions
|
@ -183,7 +183,6 @@ public function logout()
|
|||
unset($this->session['expires_on']);
|
||||
unset($this->session['username']);
|
||||
unset($this->session['visibility']);
|
||||
unset($this->session['untaggedonly']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
$this->get('/add-tag/{newTag}', '\Shaarli\Front\Controller\Visitor\TagController:addTag');
|
||||
$this->get('/remove-tag/{tag}', '\Shaarli\Front\Controller\Visitor\TagController:removeTag');
|
||||
$this->get('/links-per-page', '\Shaarli\Front\Controller\Visitor\PublicSessionFilterController:linksPerPage');
|
||||
$this->get('/untagged-only', '\Shaarli\Front\Controller\Admin\PublicSessionFilterController:untaggedOnly');
|
||||
$this->get('/untagged-only', '\Shaarli\Front\Controller\Visitor\PublicSessionFilterController:untaggedOnly');
|
||||
})->add('\Shaarli\Front\ShaarliMiddleware');
|
||||
|
||||
$app->group('/admin', function () {
|
||||
|
|
|
@ -207,15 +207,16 @@ public function testLogout()
|
|||
'expires_on' => time() + 1000,
|
||||
'username' => 'johndoe',
|
||||
'visibility' => 'public',
|
||||
'untaggedonly' => false,
|
||||
'untaggedonly' => true,
|
||||
];
|
||||
$this->sessionManager->logout();
|
||||
|
||||
$this->assertFalse(isset($this->session['ip']));
|
||||
$this->assertFalse(isset($this->session['expires_on']));
|
||||
$this->assertFalse(isset($this->session['username']));
|
||||
$this->assertFalse(isset($this->session['visibility']));
|
||||
$this->assertFalse(isset($this->session['untaggedonly']));
|
||||
$this->assertArrayNotHasKey('ip', $this->session);
|
||||
$this->assertArrayNotHasKey('expires_on', $this->session);
|
||||
$this->assertArrayNotHasKey('username', $this->session);
|
||||
$this->assertArrayNotHasKey('visibility', $this->session);
|
||||
$this->assertArrayHasKey('untaggedonly', $this->session);
|
||||
$this->assertTrue($this->session['untaggedonly']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<div class="linklist-paging">
|
||||
<div class="paging pure-g">
|
||||
<div class="linklist-filters pure-u-1-3">
|
||||
{if="$is_logged_in or !empty($action_plugin)"}
|
||||
<span class="linklist-filters-text pure-u-0 pure-u-lg-visible">
|
||||
{'Filters'|t}
|
||||
</span>
|
||||
|
@ -16,12 +15,15 @@
|
|||
<a href="{$base_path}/untagged-only" aria-label="{'Filter untagged links'|t}" title="{'Filter untagged links'|t}"
|
||||
class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if}
|
||||
><i class="fa fa-tag" aria-hidden="true"></i></a>
|
||||
{if="$is_logged_in"}
|
||||
<a href="#" aria-label="{'Select all'|t}" title="{'Select all'|t}"
|
||||
class="filter-off select-all-button pure-u-0 pure-u-lg-visible"
|
||||
><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
|
||||
{/if}
|
||||
<a href="#" class="filter-off fold-all pure-u-lg-0" aria-label="{'Fold all'|t}" title="{'Fold all'|t}">
|
||||
<i class="fa fa-chevron-up" aria-hidden="true"></i>
|
||||
</a>
|
||||
{if="!empty($action_plugin)"}
|
||||
{loop="$action_plugin"}
|
||||
{$value.attr.class=isset($value.attr.class) ? $value.attr.class : ''}
|
||||
{$value.attr.class=!empty($value.on) ? $value.attr.class .' filter-on' : $value.attr.class .' filter-off'}
|
||||
|
|
Loading…
Reference in a new issue