From 9c7936413a8c50817044eb409661a575f7f97563 Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Sun, 11 Jan 2015 01:29:53 +0100 Subject: [PATCH] edit-tags-filter-tags-and-titles fixes #1333 extracts the tag-link into a component template... **$:/core/ui/Components/tag-link** ...so as to split the list in two, having two filters that list tiddlers in the add-tags popup to... 1. firstly, list matching used tags 2. secondly, list mathcing tiddler titles, thus availabe for tagging Does away with searching content as it is irrelevant if not distracting for tagging. Why two lists? Consider wanting to tag a tiddler with "Filters"... observe how the result would otherwise be way too far down because existing tiddler titles get in the way. Component templates are also desireable elsewhere, e.g. #1318 --- core/ui/Components/tag-link.tid | 9 +++++++++ core/ui/EditTemplate/tags.tid | 14 ++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 core/ui/Components/tag-link.tid diff --git a/core/ui/Components/tag-link.tid b/core/ui/Components/tag-link.tid new file mode 100644 index 000000000..088210d48 --- /dev/null +++ b/core/ui/Components/tag-link.tid @@ -0,0 +1,9 @@ +title: $:/core/ui/Components/tag-link + +<$link> +<$set name="backgroundColor" value={{!!color}}> +> class="tc-tag-label"> +<$view field="title" format="text"/> + + + \ No newline at end of file diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index f1490aec3..49bbd2efc 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -27,14 +27,12 @@ background-color:$(backgroundColor)$; <$reveal state=<> type="nomatch" text="" default="">
<$linkcatcher set="$:/temp/NewTagName" setTo="" message="tm-add-tag"> -<$list filter="[!is[shadow]tags[]search{$:/temp/NewTagName}sort[title]]"> -<$link> -<$set name="backgroundColor" value={{!!color}}> -> class="tc-tag-label"> -<$view field="title" format="text"/> - - - +<$list filter="[tags[]search:title{$:/temp/NewTagName}sort[]]"> +{{||$:/core/ui/Components/tag-link}} + +
+<$list filter="[!is[system]search:title{$:/temp/NewTagName}sort[]]"> +{{||$:/core/ui/Components/tag-link}}