1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-10 10:48:05 +00:00

Move search result count logic out of translations

Also fixes a problem pointed out by @Evolena whereby the advanced
search counts hadn’t been adjusted to remove `$:/temp/advancedsearch`
from the search.
This commit is contained in:
Jermolene
2014-10-21 20:27:42 +01:00
parent 53d834c86b
commit ddc7495542
13 changed files with 52 additions and 34 deletions

View File

@@ -21,8 +21,10 @@ caption: {{$:/language/Search/Filter/Caption}}
</$linkcatcher>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter={{$:/temp/advancedsearch}}/>""">
<div class="tc-search-results">
<<lingo Filter/Matches>>
<$list filter={{$:/temp/advancedsearch}} template="$:/core/ui/ListItemTemplate"/>
</div>
</$set>
</$reveal>

View File

@@ -13,6 +13,8 @@ caption: {{$:/language/Search/Shadows/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo Shadows/Matches>>
@@ -21,6 +23,8 @@ caption: {{$:/language/Search/Shadows/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">

View File

@@ -13,6 +13,8 @@ caption: {{$:/language/Search/Standard/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[!is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo Standard/Matches>>
@@ -21,6 +23,8 @@ caption: {{$:/language/Search/Standard/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">

View File

@@ -13,6 +13,8 @@ caption: {{$:/language/Search/System/Caption}}
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="""<$count filter="[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]"/>""">
<div class="tc-search-results">
<<lingo System/Matches>>
@@ -21,6 +23,8 @@ caption: {{$:/language/Search/System/Caption}}
</div>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="match" text="">