2013-11-15 22:55:32 +00:00
|
|
|
title: $:/core/ui/EditTemplate/fields
|
|
|
|
tags: $:/tags/EditTemplate
|
2013-06-08 16:34:51 +00:00
|
|
|
|
2014-02-16 09:46:43 +00:00
|
|
|
\define lingo-base() $:/language/EditTemplate/
|
2014-08-01 16:03:53 +00:00
|
|
|
\define config-title()
|
|
|
|
$:/config/EditTemplateFields/Visibility/$(currentField)$
|
|
|
|
\end
|
2014-12-04 09:39:14 +00:00
|
|
|
|
2014-08-10 08:13:56 +00:00
|
|
|
\define config-filter()
|
|
|
|
[[hide]] -[title{$(config-title)$}]
|
|
|
|
\end
|
2014-12-04 09:39:14 +00:00
|
|
|
|
2018-04-24 21:03:59 +00:00
|
|
|
\define new-field()
|
|
|
|
<$vars name={{$:/temp/newfieldname}}>
|
2015-04-03 08:06:57 +00:00
|
|
|
<$reveal type="nomatch" text="" default=<<name>>>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$button>
|
2018-04-24 21:03:59 +00:00
|
|
|
<$action-sendmessage $message="tm-add-field"
|
|
|
|
$name=<<name>>
|
|
|
|
$value={{$:/temp/newfieldvalue}}/>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
|
|
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
|
|
|
|
<<lingo Fields/Add/Button>>
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
2015-04-03 08:06:57 +00:00
|
|
|
<$reveal type="match" text="" default=<<name>>>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$button>
|
|
|
|
<<lingo Fields/Add/Button>>
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
2018-04-24 21:03:59 +00:00
|
|
|
</$vars>
|
2015-04-03 08:06:57 +00:00
|
|
|
\end
|
|
|
|
|
2014-08-28 17:47:21 +00:00
|
|
|
<div class="tc-edit-fields">
|
|
|
|
<table class="tc-edit-fields">
|
2014-04-06 21:49:59 +00:00
|
|
|
<tbody>
|
2014-08-01 16:03:53 +00:00
|
|
|
<$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField">
|
2014-08-10 08:13:56 +00:00
|
|
|
<$list filter=<<config-filter>> variable="temp">
|
2014-08-28 17:47:21 +00:00
|
|
|
<tr class="tc-edit-field">
|
|
|
|
<td class="tc-edit-field-name">
|
2014-04-06 21:49:59 +00:00
|
|
|
<$text text=<<currentField>>/>:</td>
|
2014-08-28 17:47:21 +00:00
|
|
|
<td class="tc-edit-field-value">
|
2019-03-02 18:04:27 +00:00
|
|
|
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}}/>
|
2014-04-06 21:49:59 +00:00
|
|
|
</td>
|
2014-08-28 17:47:21 +00:00
|
|
|
<td class="tc-edit-field-remove">
|
2014-11-07 21:15:21 +00:00
|
|
|
<$button class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}>
|
2014-11-06 18:32:11 +00:00
|
|
|
<$action-deletefield $field=<<currentField>>/>
|
|
|
|
{{$:/core/images/delete-button}}
|
|
|
|
</$button>
|
2014-04-06 21:49:59 +00:00
|
|
|
</td>
|
2013-10-21 22:10:20 +00:00
|
|
|
</tr>
|
2014-08-10 08:13:56 +00:00
|
|
|
</$list>
|
2013-10-21 22:10:20 +00:00
|
|
|
</$list>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-06-08 16:34:51 +00:00
|
|
|
</div>
|
|
|
|
|
2014-12-04 09:39:14 +00:00
|
|
|
<$fieldmangler>
|
2014-08-28 17:47:21 +00:00
|
|
|
<div class="tc-edit-field-add">
|
|
|
|
<em class="tc-edit">
|
2014-04-06 21:49:59 +00:00
|
|
|
<<lingo Fields/Add/Prompt>>
|
2014-11-06 18:24:33 +00:00
|
|
|
</em>
|
|
|
|
<span class="tc-edit-field-add-name">
|
2019-03-02 18:04:27 +00:00
|
|
|
<$edit-text tiddler="$:/temp/newfieldname" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<<qualify "$:/state/popup/field-dropdown">> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}/>
|
2014-11-06 18:24:33 +00:00
|
|
|
</span>
|
2015-06-29 17:45:41 +00:00
|
|
|
<$button popup=<<qualify "$:/state/popup/field-dropdown">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>
|
|
|
|
<$reveal state=<<qualify "$:/state/popup/field-dropdown">> type="nomatch" text="" default="">
|
|
|
|
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
2018-11-24 15:53:39 +00:00
|
|
|
<$set name="tv-show-missing-links" value="yes">
|
2015-06-29 17:45:41 +00:00
|
|
|
<$linkcatcher to="$:/temp/newfieldname">
|
|
|
|
<div class="tc-dropdown-item">
|
2015-07-01 14:58:49 +00:00
|
|
|
<<lingo Fields/Add/Dropdown/User>>
|
|
|
|
</div>
|
2016-10-08 11:18:19 +00:00
|
|
|
<$list filter="[!is[shadow]!is[system]fields[]search:title{$:/temp/newfieldname}sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type" variable="currentField">
|
2015-06-29 17:45:41 +00:00
|
|
|
<$link to=<<currentField>>>
|
|
|
|
<<currentField>>
|
|
|
|
</$link>
|
|
|
|
</$list>
|
2015-07-01 14:58:49 +00:00
|
|
|
<div class="tc-dropdown-item">
|
|
|
|
<<lingo Fields/Add/Dropdown/System>>
|
|
|
|
</div>
|
2016-10-08 11:18:19 +00:00
|
|
|
<$list filter="[fields[]search:title{$:/temp/newfieldname}sort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField">
|
2015-06-29 17:45:41 +00:00
|
|
|
<$link to=<<currentField>>>
|
|
|
|
<<currentField>>
|
|
|
|
</$link>
|
|
|
|
</$list>
|
|
|
|
</$linkcatcher>
|
2018-11-24 13:36:48 +00:00
|
|
|
</$set>
|
2015-06-29 17:45:41 +00:00
|
|
|
</div>
|
|
|
|
</$reveal>
|
2014-11-06 18:24:33 +00:00
|
|
|
<span class="tc-edit-field-add-value">
|
2019-03-02 18:04:27 +00:00
|
|
|
<$edit-text tiddler="$:/temp/newfieldvalue" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor" tabindex={{$:/config/EditTabIndex}}/>
|
2014-11-06 18:24:33 +00:00
|
|
|
</span>
|
|
|
|
<span class="tc-edit-field-add-button">
|
2015-04-03 08:06:57 +00:00
|
|
|
<$macrocall $name="new-field"/>
|
2014-04-06 21:49:59 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2014-12-04 09:39:14 +00:00
|
|
|
</$fieldmangler>
|