mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Separate the tag manager and tagger into separate tiddlers
As discussed in Hangout-101: https://www.youtube.com/watch?v=nXwCm794O6M
This commit is contained in:
parent
e98d324e66
commit
9418538104
@ -43,8 +43,6 @@ OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywik
|
||||
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
SystemTiddler/Tooltip: This is a system tiddler
|
||||
Tagger/Caption: Tagger
|
||||
TagManager/Caption: Tags
|
||||
TagManager/Colour/Heading: Colour
|
||||
TagManager/Count/Heading: Count
|
||||
TagManager/Icon/Heading: Icon
|
||||
|
@ -2,6 +2,118 @@ title: $:/Manager
|
||||
icon: $:/core/images/list
|
||||
color: #bbb
|
||||
|
||||
<div class="tc-manager">
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/Manager]!has[draft.of]]" "$:/TagManager">>
|
||||
\define tag-checkbox-actions()
|
||||
<$action-listops
|
||||
$tiddler="$:/config/Tagger/RecentTags"
|
||||
$subfilter="[<tag>] [list[$:/config/Tagger/RecentTags]] +[limit[12]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
\define tag-picker-actions()
|
||||
<<tag-checkbox-actions>>
|
||||
<$action-listops
|
||||
$tiddler=<<currentTiddler>>
|
||||
$field="tags"
|
||||
$subfilter="[<tag>] [all[current]tags[]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
<div class="tc-manager-wrapper">
|
||||
<div class="tc-manager-controls">
|
||||
<div class="tc-manager-control">
|
||||
Search: <$edit-text tiddler="$:/config/Tagger/Filter" tag="input" default="" placeholder="Search"/>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
Filter by tag: <$select tiddler="$:/config/Tagger/Tag" default="">
|
||||
<option value="">(none)</option>
|
||||
<$list filter="[!is{$:/config/Tagger/System}tags[]!is[system]sort[title]]" variable="tag">
|
||||
<option value=<<tag>>><$text text=<<tag>>/></option>
|
||||
</$list>
|
||||
</$select>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
Sort by: <$select tiddler="$:/config/Tagger/Sort" default="title">
|
||||
<optgroup label="Common">
|
||||
<$list filter="title modified modifier created creator created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
<optgroup label="All">
|
||||
<$list filter="[!is{$:/config/Tagger/System}fields[]sort[title]] -title -modified -modifier -created -creator -created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
</$select>
|
||||
<$checkbox tiddler="$:/config/Tagger/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
||||
Reverse order
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/Untagged" field="text" checked="yes" unchecked="no" default="no">
|
||||
Only show untagged tiddlers
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/System" field="text" checked="missing" unchecked="system" default="system">
|
||||
Show system tiddlers
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/View" field="text" checked="plain" unchecked="wikified" default="wikified">
|
||||
Show raw text
|
||||
</$checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc-manager-list">
|
||||
<$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=<<currentTiddler>>>
|
||||
<div style="tc-manager-list-item">
|
||||
<$button popup=<<qualify "$:/state/manager/popup">> class="tc-btn-invisible tc-manager-list-item-heading">
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/manager/popup">> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle">
|
||||
<div class="tc-manager-list-item-content-tiddler">
|
||||
<div class="tc-manager-list-item-content-tiddler-item">
|
||||
<$reveal state="$:/config/Tagger/View" type="nomatch" text="plain">
|
||||
<$transclude mode="block"/>
|
||||
</$reveal>
|
||||
<$reveal state="$:/config/Tagger/View" type="match" text="plain">
|
||||
<pre>
|
||||
<code>
|
||||
<$view/>
|
||||
</code>
|
||||
</pre>
|
||||
</$reveal>
|
||||
</div>
|
||||
<table class="tc-manager-list-item-content-tiddler-item tc-manager-list-item-content-tiddler-item-table">
|
||||
<tbody>
|
||||
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc-manager-list-item-content-sidebar">
|
||||
<div class="tc-manager-list-item-content-sidebar-item">
|
||||
<$list filter="[is[current]tags[]] [list[$:/config/Tagger/RecentTags]] +[sort[title]] " variable="tag">
|
||||
<div>
|
||||
<$checkbox tiddler=<<currentTiddler>> tag=<<tag>> actions=<<tag-checkbox-actions>>>
|
||||
<$macrocall $name="tag-pill" tag=<<tag>>/>
|
||||
</$checkbox>
|
||||
</div>
|
||||
</$list>
|
||||
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
||||
</div>
|
||||
<div class="tc-manager-list-item-content-sidebar-item">
|
||||
<p>
|
||||
<$button to=<<currentTiddler>>>{{$:/core/images/link}} open</$button>
|
||||
</p>
|
||||
<p>
|
||||
<$button message="tm-edit-tiddler" param=<<currentTiddler>>>{{$:/core/images/edit-button}} edit</$button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$vars>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,4 @@
|
||||
title: $:/TagManager
|
||||
tags: $:/tags/Manager
|
||||
icon: $:/core/images/tag-button
|
||||
color: #bbb
|
||||
caption: {{$:/language/TagManager/Caption}}
|
||||
|
@ -1,122 +0,0 @@
|
||||
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="[<tag>] [list[$:/config/Tagger/RecentTags]] +[limit[12]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
\define tag-picker-actions()
|
||||
<<tag-checkbox-actions>>
|
||||
<$action-listops
|
||||
$tiddler=<<currentTiddler>>
|
||||
$field="tags"
|
||||
$subfilter="[<tag>] [all[current]tags[]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
<div class="tc-manager-wrapper">
|
||||
<div class="tc-manager-controls">
|
||||
<div class="tc-manager-control">
|
||||
Search: <$edit-text tiddler="$:/config/Tagger/Filter" tag="input" default="" placeholder="Search"/>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
Filter by tag: <$select tiddler="$:/config/Tagger/Tag" default="">
|
||||
<option value="">(none)</option>
|
||||
<$list filter="[!is{$:/config/Tagger/System}tags[]!is[system]sort[title]]" variable="tag">
|
||||
<option value=<<tag>>><$text text=<<tag>>/></option>
|
||||
</$list>
|
||||
</$select>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
Sort by: <$select tiddler="$:/config/Tagger/Sort" default="title">
|
||||
<optgroup label="Common">
|
||||
<$list filter="title modified modifier created creator created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
<optgroup label="All">
|
||||
<$list filter="[!is{$:/config/Tagger/System}fields[]sort[title]] -title -modified -modifier -created -creator -created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
</$select>
|
||||
<$checkbox tiddler="$:/config/Tagger/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
||||
Reverse order
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/Untagged" field="text" checked="yes" unchecked="no" default="no">
|
||||
Only show untagged tiddlers
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/System" field="text" checked="missing" unchecked="system" default="system">
|
||||
Show system tiddlers
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Tagger/View" field="text" checked="plain" unchecked="wikified" default="wikified">
|
||||
Show raw text
|
||||
</$checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc-manager-list">
|
||||
<$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=<<currentTiddler>>>
|
||||
<div style="tc-manager-list-item">
|
||||
<$button popup=<<qualify "$:/state/manager/popup">> class="tc-btn-invisible tc-manager-list-item-heading">
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/manager/popup">> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle">
|
||||
<div class="tc-manager-list-item-content-tiddler">
|
||||
<div class="tc-manager-list-item-content-tiddler-item">
|
||||
<$reveal state="$:/config/Tagger/View" type="nomatch" text="plain">
|
||||
<$transclude mode="block"/>
|
||||
</$reveal>
|
||||
<$reveal state="$:/config/Tagger/View" type="match" text="plain">
|
||||
<pre>
|
||||
<code>
|
||||
<$view/>
|
||||
</code>
|
||||
</pre>
|
||||
</$reveal>
|
||||
</div>
|
||||
<table class="tc-manager-list-item-content-tiddler-item tc-manager-list-item-content-tiddler-item-table">
|
||||
<tbody>
|
||||
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc-manager-list-item-content-sidebar">
|
||||
<div class="tc-manager-list-item-content-sidebar-item">
|
||||
<$list filter="[is[current]tags[]] [list[$:/config/Tagger/RecentTags]] +[sort[title]] " variable="tag">
|
||||
<div>
|
||||
<$checkbox tiddler=<<currentTiddler>> tag=<<tag>> actions=<<tag-checkbox-actions>>>
|
||||
<$macrocall $name="tag-pill" tag=<<tag>>/>
|
||||
</$checkbox>
|
||||
</div>
|
||||
</$list>
|
||||
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
||||
</div>
|
||||
<div class="tc-manager-list-item-content-sidebar-item">
|
||||
<p>
|
||||
<$button to=<<currentTiddler>>>{{$:/core/images/link}} open</$button>
|
||||
</p>
|
||||
<p>
|
||||
<$button message="tm-edit-tiddler" param=<<currentTiddler>>>{{$:/core/images/edit-button}} edit</$button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$vars>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user