TiddlyWiki5/core/ui/ImportListing.tid

71 lines
1.9 KiB
Plaintext

title: $:/core/ui/ImportListing
\define lingo-base() $:/language/Import/
\define messageField()
message-$(payloadTiddler)$
\end
\define selectionField()
selection-$(payloadTiddler)$
\end
\define previewPopupState()
$(currentTiddler)$!!popup-$(payloadTiddler)$
\end
\define select-all-actions()
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
<$action-setfield $field={{{ [<payloadTiddler>addprefix[selection-]] }}} $value={{$:/state/import/select-all}}/>
</$list>
\end
<table>
<tbody>
<tr>
<th>
<$checkbox tiddler="$:/state/import/select-all" field="text" checked="checked" unchecked="unchecked" default="checked" actions=<<select-all-actions>>>
<<lingo Listing/Select/Caption>>
</$checkbox>
</th>
<th>
<<lingo Listing/Title/Caption>>
</th>
<th>
<<lingo Listing/Status/Caption>>
</th>
</tr>
<$list filter="[all[current]plugintiddlers[]sort[title]]" variable="payloadTiddler">
<tr>
<td>
<$checkbox field=<<selectionField>> checked="checked" unchecked="unchecked" default="checked"/>
</td>
<td>
<$reveal type="nomatch" state=<<previewPopupState>> text="yes" tag="div">
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<previewPopupState>> setTo="yes">
{{$:/core/images/right-arrow}}<span class="tc-small-gap-left"><$text text=<<payloadTiddler>>/></span>
</$button>
</$reveal>
<$reveal type="match" state=<<previewPopupState>> text="yes" tag="div">
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<previewPopupState>> setTo="no">
{{$:/core/images/down-arrow}}<span class="tc-small-gap-left"><$text text=<<payloadTiddler>>/></span>
</$button>
</$reveal>
</td>
<td>
<$view field=<<messageField>>/>
</td>
</tr>
<tr>
<td colspan="3">
<$reveal type="match" text="yes" state=<<previewPopupState>> tag="div">
<$list filter="[{$:/state/importpreviewtype}has[text]]" variable="listItem" emptyMessage={{$:/core/ui/ImportPreviews/Text}}>
<$transclude tiddler={{$:/state/importpreviewtype}}/>
</$list>
</$reveal>
</td>
</tr>
</$list>
</tbody>
</table>