From 5e175ec7c1191a4d88e8220161c091a000e5dc6b Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Tue, 20 Jan 2015 16:51:41 +0100 Subject: [PATCH] changed tabs to use same filters as AdvancedSearch ...to have one place to configure / override --- core/language/en-GB/Filters.multids | 1 + core/ui/Filters/TypedTiddlers | 5 +++++ core/ui/MoreSideBar/All.tid | 2 +- core/ui/MoreSideBar/Drafts.tid | 2 +- core/ui/MoreSideBar/Missing.tid | 2 +- core/ui/MoreSideBar/Orphans.tid | 2 +- core/ui/MoreSideBar/Shadows.tid | 2 +- core/ui/MoreSideBar/System.tid | 2 +- core/ui/MoreSideBar/Tags.tid | 2 +- core/ui/MoreSideBar/Types.tid | 2 +- 10 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 core/ui/Filters/TypedTiddlers diff --git a/core/language/en-GB/Filters.multids b/core/language/en-GB/Filters.multids index 652b78f3c..45f8991fc 100644 --- a/core/language/en-GB/Filters.multids +++ b/core/language/en-GB/Filters.multids @@ -11,3 +11,4 @@ SystemTiddlers: System tiddlers ShadowTiddlers: Shadow tiddlers OverriddenShadowTiddlers: Overridden shadow tiddlers SystemTags: System tags +TypedTiddlers: Non wiki-text tiddlers \ No newline at end of file diff --git a/core/ui/Filters/TypedTiddlers b/core/ui/Filters/TypedTiddlers new file mode 100644 index 000000000..e31bfd278 --- /dev/null +++ b/core/ui/Filters/TypedTiddlers @@ -0,0 +1,5 @@ +title: $:/core/Filters/TypedTiddlers +tags: $:/tags/Filter +filter: [!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]] +description: {{$:/language/Filters/TypedTiddlers}} + diff --git a/core/ui/MoreSideBar/All.tid b/core/ui/MoreSideBar/All.tid index 404620e3c..1f6f3e451 100644 --- a/core/ui/MoreSideBar/All.tid +++ b/core/ui/MoreSideBar/All.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/All tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/All/Caption}} -<$list filter="[!is[system]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter={{$:/core/Filters/AllTiddlers!!filter}} template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Drafts.tid b/core/ui/MoreSideBar/Drafts.tid index 736445868..30e4ec222 100644 --- a/core/ui/MoreSideBar/Drafts.tid +++ b/core/ui/MoreSideBar/Drafts.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Drafts tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Drafts/Caption}} -<$list filter="[has[draft.of]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter={{$:/core/Filters/Drafts!!filter}} template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Missing.tid b/core/ui/MoreSideBar/Missing.tid index b8382da6a..f04d5250c 100644 --- a/core/ui/MoreSideBar/Missing.tid +++ b/core/ui/MoreSideBar/Missing.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Missing tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Missing/Caption}} -<$list filter="[all[missing]sort[title]]" template="$:/core/ui/MissingTemplate"/> +<$list filter={{$:/core/Filters/Missing!!filter}} template="$:/core/ui/MissingTemplate"/> diff --git a/core/ui/MoreSideBar/Orphans.tid b/core/ui/MoreSideBar/Orphans.tid index 9485e887f..28660471d 100644 --- a/core/ui/MoreSideBar/Orphans.tid +++ b/core/ui/MoreSideBar/Orphans.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Orphans tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Orphans/Caption}} -<$list filter="[all[orphans]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter={{$:/core/Filters/Orphans!!filter}} template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Shadows.tid b/core/ui/MoreSideBar/Shadows.tid index d7ca78493..f403c7f4c 100644 --- a/core/ui/MoreSideBar/Shadows.tid +++ b/core/ui/MoreSideBar/Shadows.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/Shadows tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Shadows/Caption}} -<$list filter="[all[shadows]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter={{$:/core/Filters/ShadowTiddlers!!filter}} template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/System.tid b/core/ui/MoreSideBar/System.tid index 8ad930887..932e68085 100644 --- a/core/ui/MoreSideBar/System.tid +++ b/core/ui/MoreSideBar/System.tid @@ -2,4 +2,4 @@ title: $:/core/ui/MoreSideBar/System tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/System/Caption}} -<$list filter="[is[system]sort[title]]" template="$:/core/ui/ListItemTemplate"/> +<$list filter={{$:/core/Filters/SystemTiddlers!!filter}} template="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/MoreSideBar/Tags.tid b/core/ui/MoreSideBar/Tags.tid index b3499b527..268bca137 100644 --- a/core/ui/MoreSideBar/Tags.tid +++ b/core/ui/MoreSideBar/Tags.tid @@ -16,7 +16,7 @@ caption: {{$:/language/SideBar/Tags/Caption}} -<$list filter="[tags[]!is[system]sort[title]]"> +<$list filter={{$:/core/Filters/AllTags!!filter}}> <$transclude tiddler="$:/core/ui/TagTemplate"/> <$count filter="[all[current]tagging[]]"/> diff --git a/core/ui/MoreSideBar/Types.tid b/core/ui/MoreSideBar/Types.tid index deb52e17f..a23d729bb 100644 --- a/core/ui/MoreSideBar/Types.tid +++ b/core/ui/MoreSideBar/Types.tid @@ -2,7 +2,7 @@ title: $:/core/ui/MoreSideBar/Types tags: $:/tags/MoreSideBar caption: {{$:/language/SideBar/Types/Caption}} -<$list filter="[!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]]"> +<$list filter={{$:/core/Filters/TypedTiddlers!!filter}}>
<$view field="type"/> <$list filter="[type{!!type}!is[system]sort[title]]">