mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-05 17:46:19 +00:00
b30126ec22
The metadata for each field is in a tiddler tagged `$:/tags/DocumentMetaData` with the field `caption` being the displayed caption for the field and `field` being the name of the field. `field-type` is the type of the field, and can be “string” or “list”.
39 lines
1018 B
Plaintext
39 lines
1018 B
Plaintext
title: $:/plugins/tiddlywiki/text-slicer/ui/document/header
|
|
|
|
\define metadatafield()
|
|
<tr>
|
|
<td>
|
|
''<$transclude tiddler=<<listItem>> field="caption"/>''
|
|
</td>
|
|
<td>
|
|
<$reveal type="match" state="""$(listItem)$!!field-type""" text="string">
|
|
<$edit-text field={{$(listItem)$!!field}}/>
|
|
</$reveal>
|
|
<$reveal type="match" state="""$(listItem)$!!field-type""" text="list">
|
|
<$edit-text tag="textarea" field={{$(listItem)$!!field}}/>
|
|
</$reveal>
|
|
</td>
|
|
</tr>
|
|
\end
|
|
|
|
<div class="tc-sliced-document-header">
|
|
|
|
''Exclude filter'': <$edit-text field="toc-exclude-filter"/>
|
|
|
|
<$checkbox tiddler=<<config-show-toolbar>> field="text" checked="yes" unchecked="no" default="no"> Show toolbar</$checkbox>
|
|
|
|
<$button>
|
|
<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> template="$:/plugins/tiddlywiki/text-slicer/templates/plain/document"/>
|
|
View document
|
|
</$button>
|
|
|
|
<table>
|
|
<tbody>
|
|
<$list filter="[all[system+tiddlers]tag[$:/tags/DocumentMetaData]]" variable="listItem">
|
|
<<metadatafield>>
|
|
</$list>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|