From 7d86f40bdb2135655b5b4fe8cbcc1ac102114f86 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 1 Apr 2017 12:17:37 +0200 Subject: 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 --- tpl/default/linklist.html | 6 +++++- tpl/vintage/linklist.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'tpl') diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 57ef4567..3d6be529 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -89,7 +89,7 @@
{'Nothing found.'|t}
- {elseif="!empty($search_term) or !empty($search_tags) or !empty($visibility)"} + {elseif="!empty($search_term) or $search_tags !== '' or !empty($visibility)"}
@@ -105,6 +105,10 @@ {$value} {/loop} + {elseif="$search_tags === false"} + + {'untagged'|t} + {/if} {if="!empty($visibility)"} {'with status'|t} diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index fc116667..8458caa1 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html @@ -55,7 +55,7 @@ {if="count($links)==0"}
Nothing found.
- {elseif="!empty($search_term) or !empty($search_tags)"} + {elseif="!empty($search_term) or $search_tags !== ''"}
{$result_count} results {if="!empty($search_term)"} @@ -69,6 +69,10 @@ {$value} x {/loop} + {elseif="$search_tags === false"} + + untagged x + {/if}
{/if} -- cgit v1.2.3