tags: $:/tags/EditTemplate
title: $:/core/ui/EditTemplate/title

<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus="true" tabindex={{$:/config/EditTabIndex}}/>

<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div">

<$list filter="[{!!draft.title}!is[missing]]" variable="listItem">

<div class="tc-message-box">

{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}

</div>

</$list>

<$list filter="[{!!draft.of}!is[missing]]" variable="listItem">

<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>

<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>

<$list filter="[all[relinkable]relink:references<fromTitle>limit[1]]" variable="listItem">

<$vars stateTiddler=<<qualify "$:/state/edit/references">> >

<$tiddler tiddler=<<fromTitle>> >

<$set
	name="prompt"
	filter="[all[relinkable]relink:impossible<toTitle>]"
	value="EditTemplate/Title/Impossibles/Prompt"
	emptyValue="EditTemplate/Title/References/Prompt" >
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}
<$macrocall $name=lingo title=<<prompt>> />
</$button>
</$reveal>
<$reveal type="match" state=<<stateTiddler>> text="show">
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}
<$macrocall $name=lingo title=<<prompt>> />
</$button>
</$reveal>
</$set>

<$reveal type="match" state=<<stateTiddler>> text="show">
<$list variable="listItem" filter="[all[relinkable]!title[$:/StoryList]relink:references<fromTitle>sort[title]]" template="$:/plugins/flibbles/relink/ui/ListItemTemplate">
</$list>
</$reveal>
</$tiddler>

</$vars>

</$list>

</$vars>

</$list>

</$reveal>
