Empty tag search will look for not tagged links
Fixes #784 From now, searching for tags with an empty value will return only not tagged links, with the search bar showing `x results [not tagged]`. Note that using the api, the searchtags request parameter must be set to `false` to get the same result. - [ ] Update API doc
This commit is contained in:
parent
b64d83cd2b
commit
7d86f40bdb
12 changed files with 115 additions and 36 deletions
tpl
|
@ -89,7 +89,7 @@
|
|||
<div id="searchcriteria">{'Nothing found.'|t}</div>
|
||||
</div>
|
||||
</div>
|
||||
{elseif="!empty($search_term) or !empty($search_tags) or !empty($visibility)"}
|
||||
{elseif="!empty($search_term) or $search_tags !== '' or !empty($visibility)"}
|
||||
<div class="pure-g pure-alert pure-alert-success search-result">
|
||||
<div class="pure-u-2-24"></div>
|
||||
<div class="pure-u-20-24">
|
||||
|
@ -105,6 +105,10 @@
|
|||
<a href="?removetag={function="urlencode($value)"}">{$value}<span class="remove"><i class="fa fa-times"></i></span></a>
|
||||
</span>
|
||||
{/loop}
|
||||
{elseif="$search_tags === false"}
|
||||
<span class="label label-tag" title="{'Remove tag'|t}">
|
||||
<a href="?">{'untagged'|t}<span class="remove"><i class="fa fa-times"></i></span></a>
|
||||
</span>
|
||||
{/if}
|
||||
{if="!empty($visibility)"}
|
||||
{'with status'|t}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
{if="count($links)==0"}
|
||||
<div id="searchcriteria">Nothing found.</div>
|
||||
{elseif="!empty($search_term) or !empty($search_tags)"}
|
||||
{elseif="!empty($search_term) or $search_tags !== ''"}
|
||||
<div id="searchcriteria">
|
||||
{$result_count} results
|
||||
{if="!empty($search_term)"}
|
||||
|
@ -69,6 +69,10 @@
|
|||
<a href="?removetag={function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
|
||||
</span>
|
||||
{/loop}
|
||||
{elseif="$search_tags === false"}
|
||||
<span class="linktag" title="Remove tag">
|
||||
<a href="?">untagged <span class="remove">x</span></a>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue