<$edit-text field="color" tag="input" type="color"/> |
-<$transclude tiddler="$:/core/ui/TagTemplate"/> |
+<$macrocall $name="tag" tag=<>/> |
<$count filter="[all[current]tagging[]]"/> |
<$macrocall $name="iconEditor" title={{!!title}}/>
diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid
index f302d8f3d..569e6ad0f 100644
--- a/core/ui/TagTemplate.tid
+++ b/core/ui/TagTemplate.tid
@@ -1,30 +1,3 @@
title: $:/core/ui/TagTemplate
-\define tag-styles()
-background-color:$(backgroundColor)$;
-fill:$(foregroundColor)$;
-color:$(foregroundColor)$;
-\end
-
-\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
-<$vars foregroundColor=<> backgroundColor="""$colour$""">
-<$button popup=<> class="tc-btn-invisible tc-tag-label" style=<>>
-<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" />
-$button>
-<$reveal state=<> type="popup" position="below" animate="yes" class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
-<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
-<$transclude tiddler=<>/>
-$list>
-
-<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
-$reveal>
-$vars>
-\end
-
-\define tag-body(colour,palette)
-
-<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
-
-\end
-
-<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
+<$macrocall $name="tag" tag=<>/>
diff --git a/core/ui/Tagger.tid b/core/ui/Tagger.tid
new file mode 100644
index 000000000..06383e974
--- /dev/null
+++ b/core/ui/Tagger.tid
@@ -0,0 +1,122 @@
+title: $:/Tagger
+tags: $:/tags/Manager
+icon: $:/core/images/list
+color: #bbb
+caption: {{$:/language/Tagger/Caption}}
+
+\define tag-checkbox-actions()
+<$action-listops
+ $tiddler="$:/config/Tagger/RecentTags"
+ $subfilter="[] [list[$:/config/Tagger/RecentTags]] +[limit[12]]"
+/>
+\end
+
+\define tag-picker-actions()
+<>
+<$action-listops
+ $tiddler=<>
+ $field="tags"
+ $subfilter="[] [all[current]tags[]]"
+/>
+\end
+
+
+
+
+Search: <$edit-text tiddler="$:/config/Tagger/Filter" tag="input" default="" placeholder="Search"/>
+
+
+Filter by tag: <$select tiddler="$:/config/Tagger/Tag" default="">
+
+<$list filter="[!is{$:/config/Tagger/System}tags[]!is[system]sort[title]]" variable="tag">
+
+$list>
+$select>
+
+
+Sort by: <$select tiddler="$:/config/Tagger/Sort" default="title">
+
+
+$select>
+<$checkbox tiddler="$:/config/Tagger/Order" field="text" checked="reverse" unchecked="forward" default="forward">
+Reverse order
+$checkbox>
+
+
+<$checkbox tiddler="$:/config/Tagger/Untagged" field="text" checked="yes" unchecked="no" default="no">
+Only show untagged tiddlers
+$checkbox>
+
+
+<$checkbox tiddler="$:/config/Tagger/System" field="text" checked="missing" unchecked="system" default="system">
+Show system tiddlers
+$checkbox>
+
+
+<$checkbox tiddler="$:/config/Tagger/View" field="text" checked="plain" unchecked="wikified" default="wikified">
+Show raw text
+$checkbox>
+
+
+
+<$list filter="[!is{$:/config/Tagger/System}search{$:/config/Tagger/Filter}tag:strict{$:/config/Tagger/Tag}untagged:no{$:/config/Tagger/Untagged}sort{$:/config/Tagger/Sort}order{$:/config/Tagger/Order}]">
+<$vars transclusion=< >>
+
+<$button popup=< > class="tc-btn-invisible tc-manager-list-item-heading">
+<$text text=<>/>
+$button>
+<$reveal state=<> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle">
+
+
+<$reveal state="$:/config/Tagger/View" type="nomatch" text="plain">
+<$transclude mode="block"/>
+$reveal>
+<$reveal state="$:/config/Tagger/View" type="match" text="plain">
+
+
+<$view/>
+
+
+$reveal>
+
+
+
+<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
+
+
+
+
+$reveal>
+
+$vars>
+$list>
+
+
+
diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids
index 7ad91db29..f880b3399 100644
--- a/core/wiki/config/PageControlButtons.multids
+++ b/core/wiki/config/PageControlButtons.multids
@@ -11,6 +11,7 @@ core/ui/Buttons/refresh: hide
core/ui/Buttons/import: hide
core/ui/Buttons/language: hide
core/ui/Buttons/tag-manager: hide
+core/ui/Buttons/manager: hide
core/ui/Buttons/more-page-actions: hide
core/ui/Buttons/new-journal: hide
core/ui/Buttons/new-image: hide
diff --git a/core/wiki/config/Tagger.multids b/core/wiki/config/Tagger.multids
new file mode 100644
index 000000000..f37f39885
--- /dev/null
+++ b/core/wiki/config/Tagger.multids
@@ -0,0 +1,9 @@
+title: $:/config/Tagger/
+
+Filter:
+Order: forward
+Sort: title
+System: system
+Tag:
+Untagged: no
+View: wikified
diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid
new file mode 100644
index 000000000..aaea75632
--- /dev/null
+++ b/core/wiki/macros/tag-picker.tid
@@ -0,0 +1,41 @@
+title: $:/core/macros/tag-picker
+tags: $:/tags/Macro
+
+\define tag-button()
+<$button class="tc-btn-invisible" tag="a">
+$(actions)$
+<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
+<$macrocall $name="tag-pill" tag=<>/>
+$button>
+\end
+
+\define tag-picker(actions)
+<$set name="actions" value="""$actions$""">
+
+
+<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle"/>
+ <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}$button>
+<$set name="tag" value={{$:/temp/NewTagName}}>
+<$button set="$:/temp/NewTagName" setTo="" class="">
+$actions$
+<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
+{{$:/language/EditTemplate/Tags/Add/Button}}
+$button>
+$set>
+
+
+
+<$reveal state=< > type="nomatch" text="" default="">
+
+<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
+<>
+$list>
+
+<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
+<>
+$list>
+
+$reveal>
+
+$set>
+\end
diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid
index b65bfc046..dc23f3238 100644
--- a/core/wiki/macros/tag.tid
+++ b/core/wiki/macros/tag.tid
@@ -1,6 +1,44 @@
title: $:/core/macros/tag
tags: $:/tags/Macro
-\define tag(tag)
-{{$tag$||$:/core/ui/TagTemplate}}
+\define tag-pill-styles()
+background-color:$(backgroundColor)$;
+fill:$(foregroundColor)$;
+color:$(foregroundColor)$;
+\end
+
+\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
+<$vars foregroundColor=<> backgroundColor="""$colour$""">
+<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<>>
+$actions$<$transclude tiddler="""$icon$"""/> <$view tiddler="""$tag$""" field="title" format="text" />
+$element-tag$>
+$vars>
+\end
+
+\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
+<$macrocall $name="tag-pill-inner" tag="""$tag$""" icon="""$icon$""" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
+\end
+
+\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")
+
+<$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
+
+\end
+
+\define tag(tag)
+
+<$set name="transclusion" value="""$tag$""">
+<$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<>"""/>
+<$reveal state=<> type="popup" position="below" animate="yes" class="tc-drop-down">
+<$tiddler tiddler="""$tag$""">
+<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
+<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
+<$transclude tiddler=<>/>
+$list>
+
+<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
+$tiddler>
+$reveal>
+$set>
+
\end
diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid
index 3bef09b7d..4d5972827 100644
--- a/core/wiki/tags/PageControls.tid
+++ b/core/wiki/tags/PageControls.tid
@@ -1,2 +1,2 @@
title: $:/tags/PageControls
-list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]
+list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/manager]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/timestamp]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/print]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]
diff --git a/editions/tw5.com/tiddlers/filters/tag.tid b/editions/tw5.com/tiddlers/filters/tag.tid
index 995cae7b1..929464b15 100644
--- a/editions/tw5.com/tiddlers/filters/tag.tid
+++ b/editions/tw5.com/tiddlers/filters/tag.tid
@@ -1,18 +1,23 @@
+caption: tag
created: 20140410103123179
-modified: 20150203191853000
+modified: 20161126122900712
+op-input: a [[selection of titles|Title Selection]]
+op-neg-output: those input tiddlers that do <<.em not>> have tag <<.place T>>
+op-output: those input tiddlers that have tag <<.place T>>
+op-parameter: the title of a [[tag|Tagging]]
+op-parameter-name: T
+op-purpose: filter the input by tag
+op-suffix: <<.from-version "5.1.14">> optional `strict` flag
+op-suffix-name: S
tags: [[Filter Operators]] [[Common Operators]] [[Tag Operators]] [[Negatable Operators]]
title: tag Operator
type: text/vnd.tiddlywiki
-caption: tag
-op-purpose: filter the input by tag
-op-input: a [[selection of titles|Title Selection]]
-op-parameter: the title of a [[tag|Tagging]]
-op-parameter-name: T
-op-output: those input tiddlers that have tag <<.place T>>
-op-neg-output: those input tiddlers that do <<.em not>> have tag <<.place T>>
The output is [[sorted|Order of Tagged Tiddlers]] using the tag's <<.field list>> field and the tiddlers' <<.field list-before>> and <<.field list-after>> fields.
-If <<.place T>> is empty, the output of `tag` is empty, and the output of `!tag` is a copy of the input.
+The behaviour when <<.place T>> is empty depends on the settings of the <<.place S>> optional suffix:
+
+* if <<.place T>> is missing and <<.place S>> is either missing or set to "loose", then the output of `tag` is empty, and the output of `!tag` is a copy of the input.
+* <<.from-version "5.1.14">> if <<.place T>> is missing and <<.place S>> is set to "strict", then the output of both `tag` and `!tag` is a copy of the input
<<.operator-examples "tag">>
diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid
index 78aae3b1f..9452a2ebe 100644
--- a/themes/tiddlywiki/snowwhite/base.tid
+++ b/themes/tiddlywiki/snowwhite/base.tid
@@ -50,7 +50,7 @@ canvas.tc-edit-bitmapeditor {
<>
}
-.tc-drop-down {
+.tc-drop-down, .tc-drop-down-simple {
border-radius: 4px;
<>
}
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index 0cadceb1e..cf6a4a457 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -1287,6 +1287,14 @@ html body.tc-body.tc-single-tiddler-window {
position: relative;
}
+.tc-drop-down-simple {
+ min-width: 380px;
+ border: 1px solid <>;
+ background-color: <>;
+ padding: 7px;
+ margin: 4px 0 0 0;
+}
+
.tc-drop-down {
min-width: 380px;
border: 1px solid <>;
@@ -1725,6 +1733,80 @@ html body.tc-body.tc-single-tiddler-window {
border: none;
}
+/*
+** Manager
+*/
+
+.tc-manager-wrapper {
+
+}
+
+.tc-manager-controls {
+
+}
+
+.tc-manager-control {
+ margin: 0.5em 0;
+}
+
+.tc-manager-list {
+ width: 100%;
+ border-top: 1px solid <>;
+ border-left: 1px solid <>;
+ border-right: 1px solid <>;
+}
+
+.tc-manager-list-item {
+
+}
+
+.tc-manager-list-item-heading {
+ display: block;
+ width: 100%;
+ text-align: left;
+ border-bottom: 1px solid <>;
+ padding: 3px;
+}
+
+.tc-manager-list-item-heading:hover {
+ background: <>;
+ color: <>;
+}
+
+.tc-manager-list-item-content {
+ display: flex;
+}
+
+.tc-manager-list-item-content-sidebar {
+ flex: 1 0;
+ background: <>;
+ border-right: 0.5em solid <>;
+ border-bottom: 0.5em solid <>;
+ white-space: nowrap;
+}
+
+.tc-manager-list-item-content-sidebar-item {
+ border-top: 0.5em solid <>;
+ padding: 0 0.5em 0 0.5em;
+}
+
+.tc-manager-list-item-content-tiddler {
+ flex: 3 1;
+ border-left: 0.5em solid <>;
+ border-right: 0.5em solid <>;
+ border-bottom: 0.5em solid <>;
+}
+
+.tc-manager-list-item-content-tiddler-item {
+ border-top: 0.5em solid <>;
+ padding: 0.5em;
+}
+
+.tc-manager-list-item-content-tiddler-item.tc-manager-list-item-content-tiddler-item-table {
+ padding: 0;
+ margin: 0;
+}
+
/*
** Alerts
*/
|