mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 22:16:43 +00:00
* Initial Commit
* Set currentTiddler and ..currentTiddler for filter evaulation
* Precompile the filters for performance
* Add explicit test for empty result when no filter passes
* Use the cascade filter run prefix to choose the view template body template
* Use the cascade mechanism to choose between the edit and view templates
* Simplify cascade filter
Thanks @saqimtiaz
* Add control panel UI for inspecting the template cascades
* Refactor import listing and plugin listing as alternate body templates
As suggested by @pmario
* Refer to $:/core/ui/{View|Edit}Template via their associated config tiddlers
* Fix typo in previous commit
* Add demo of custom story tiddler template
* Tweak control panel wording
* Standardise "Story Tiddler Template" nomenclature
* Add a cascade for the editor template body
* Add a cascade for the view template title
* Avoid unwanted whitespace
* Add a cascade for dynamically choosing tiddler icons
37 lines
999 B
Plaintext
37 lines
999 B
Plaintext
title: $:/core/ui/ViewTemplate/body/import
|
|
|
|
\define lingo-base() $:/language/Import/
|
|
|
|
\define confirmCancel()
|
|
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
|
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
|
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
|
</$action-confirm>
|
|
\end
|
|
|
|
\define buttons()
|
|
<$button actions=<<confirmCancel>> ><<lingo Listing/Cancel/Caption>></$button>
|
|
<$button message="tm-perform-import" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>
|
|
<<lingo Listing/Preview>> <$select tiddler="$:/state/importpreviewtype" default="$:/core/ui/ImportPreviews/Text">
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportPreview]!has[draft.of]]">
|
|
<option value=<<currentTiddler>>>{{!!caption}}</option>
|
|
</$list>
|
|
</$select>
|
|
\end
|
|
|
|
<$list filter="[all[current]field:plugin-type[import]]">
|
|
|
|
<div class="tc-import">
|
|
|
|
<<lingo Listing/Hint>>
|
|
|
|
<<buttons>>
|
|
|
|
{{||$:/core/ui/ImportListing}}
|
|
|
|
<<buttons>>
|
|
|
|
</div>
|
|
|
|
</$list>
|