mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-04 17:56:56 +00:00
Text-slicer: Control preview column with dropdown
Instead of showing a sequence of all documents in the preview column, we just show a single document, with a dropdown to choose which one is shown. The change makes it easier to deal with large numbers of documents.
This commit is contained in:
parent
bc0cbf9070
commit
0769b90bb7
11
plugins/tiddlywiki/text-slicer/ui/preview-column-empty.tid
Normal file
11
plugins/tiddlywiki/text-slicer/ui/preview-column-empty.tid
Normal file
@ -0,0 +1,11 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/ui/preview-column/empty
|
||||
|
||||
<div class="tc-sliced-document-header">
|
||||
|
||||
Create a document by slicing an existing tiddler
|
||||
|
||||
---
|
||||
|
||||
[[Help|$:/plugins/tiddlywiki/text-slicer/docs]]
|
||||
|
||||
</div>
|
@ -0,0 +1,13 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/ui/preview-column/multiple
|
||||
|
||||
Show document: <$select tiddler="$:/plugins/tiddlywiki/text-slicer/config/currentDocument">
|
||||
<$list filter="[toc-type[document]!has[draft.of]sort[title]]">
|
||||
<option value=<<currentTiddler>>><$view field="title"/></option>
|
||||
</$list>
|
||||
</$select>
|
||||
|
||||
<$tiddler tiddler={{$:/plugins/tiddlywiki/text-slicer/config/currentDocument}}>
|
||||
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/document"/>
|
||||
|
||||
</$tiddler>
|
@ -0,0 +1,3 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/ui/preview-column/single
|
||||
|
||||
<$list filter="[toc-type[document]!has[draft.of]sort[title]limit[1]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/document"/>
|
@ -3,10 +3,10 @@ tags: $:/tags/AboveStory
|
||||
|
||||
<$scrollable fallthrough="no" class="tc-document-preview-column">
|
||||
|
||||
<$vars tv-default-heading-state="closed" tv-heading-status-config-prefix="preview-column">
|
||||
<$list filter="[toc-type[document]!has[draft.of]sort[title]limit[1]]" emptyMessage={{$:/plugins/tiddlywiki/text-slicer/ui/preview-column/empty}}>
|
||||
|
||||
<$list filter="[toc-type[document]!has[draft.of]sort[title]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/document"/>
|
||||
<$list filter="[toc-type[document]!has[draft.of]sort[title]butfirst[1]limit[1]]" emptyMessage={{$:/plugins/tiddlywiki/text-slicer/ui/preview-column/single}} template="$:/plugins/tiddlywiki/text-slicer/ui/preview-column/multiple"/>
|
||||
|
||||
</$vars>
|
||||
</$list>
|
||||
|
||||
</$scrollable>
|
||||
|
Loading…
x
Reference in New Issue
Block a user