1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-12 21:09:57 +00:00
TiddlyWiki5/core/ui/SideBar/Open.tid
Jermolene ee25af758e Make "Open" tab mutate into "History" tab when in STM
Instead of introducing a new "History" tab to the sidebar we make the existing "Open" tab mutate into a "History" tab when in Single Tiddler Mode.
2018-08-30 12:38:13 +01:00

38 lines
1.3 KiB
Plaintext

title: $:/core/ui/SideBar/Open
tags: $:/tags/SideBar
caption: <$list filter="[<tv-storyview-single-tiddler-mode>prefix[yes]]" emptyMessage="{{$:/language/SideBar/Open/Caption}}">{{$:/language/SideBar/History/Caption}}</$list>
\define lingo-base() $:/language/CloseAll/
\define drop-actions()
<$action-listops $tiddler="$:/StoryList" $subfilter="+[insertbefore:currentTiddler<actionTiddler>]"/>
\end
\define open()
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop">
<div style="position: relative;">
<$droppable actions=<<drop-actions>>>
<div class="tc-droppable-placeholder">
&nbsp;
</div>
<div>
<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="tc-btn-invisible tc-btn-mini">&times;</$button> <$link to={{!!title}}><$view field="title"/></$link>
</div>
</$droppable>
</div>
</$list>
<$tiddler tiddler="">
<$droppable actions=<<drop-actions>>>
<div class="tc-droppable-placeholder">
&nbsp;
</div>
<$button message="tm-close-all-tiddlers" class="tc-btn-invisible tc-btn-mini"><<lingo Button>></$button>
</$droppable>
</$tiddler>
\end
<$list filter="[<tv-storyview-single-tiddler-mode>prefix[yes]]" emptyMessage=<<open>>>
<$list filter="[list[$:/HistoryList]limit[100]]" template="$:/core/ui/ListItemTemplate"/>
</$list>