title: $:/core/ui/ControlPanel/Modals/AddPlugins subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}} \define install-plugin-button()
<$button class={{{ [get[original-title]get[version]then[tc-reinstall]] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> <$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/> <$set name="url" value={{!!url}}> <$set name="currentTiddler" value=<>> <$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency"> <$action-sendmessage $message="tm-load-plugin-from-library" url=<> title=<>/> {{$:/core/images/download-button}} <$list filter="[get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/Install/Caption}}"""> {{$:/language/ControlPanel/Plugins/Reinstall/Caption}}
<$reveal stateTitle=<> stateField="requires-reload" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}}
\end \define popup-state-macro() $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ \end \define display-plugin-info(type) <$set name="popup-state" value=<>>
<$reveal type="nomatch" state=<> text="yes"> <$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="yes"> {{$:/core/images/chevron-right}} <$reveal type="match" state=<> text="yes"> <$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="no"> {{$:/core/images/chevron-down}}
<$list filter="[has[icon]]" emptyMessage="""<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>""">

<$text text={{{ [get[name]] ~[get[original-title]split[/]last[1]] }}}/>: <$view tiddler=<> field="description"/>

<$view tiddler=<> field="original-title"/>

<$view tiddler=<> field="version"/>
<>
<$reveal type="match" text="yes" state=<>>
<$list filter="[get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/NotInstalled/Hint}}"""> {{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}} <$set name="currentTiddler" value=<>> <$list filter="[enlist{!!dependents}] [get[parent-plugin]] +[limit[1]]" variable="ignore">
{{$:/language/ControlPanel/Plugins/AlsoRequires}} <$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency"> <$text text=<>/>
<$transclude tiddler=<> field="readme" mode="block"/>
<$set name="original-title" value={{{ [get[original-title]] }}}> <$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginlimit[1]]" variable="ignore">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginsort[title]sort[name]]" variable="assetInfo"> <>
\end \define load-plugin-library-button() <$button class="tc-btn-big-green"> <$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/> {{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}} \end \define display-server-assets(type) {{$:/language/Search/Search}}: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/> <$reveal state="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" type="nomatch" text=""> <$button class="tc-btn-invisible"> <$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/> {{$:/core/images/close-button}}
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search:author,description,original-title,readme,title{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[title]sort[name]]" variable="assetInfo"> <$list filter="[[$:/temp/RemoteAssetSearch/$(currentTiddler)$]has[text]] ~[!has[parent-plugin]]" variable="ignore"> <>
\end \define display-server-connection() <$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<>> <> \end \define close-library-button() <$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''> <$button class='tc-btn-big-green'> <$action-sendmessage $message="tm-unload-plugin-library" url={{!!url}}/> {{$:/core/images/chevron-left}} {{$:/language/ControlPanel/Plugins/ClosePluginLibrary}} <$action-deletetiddler $filter="[prefix[$:/temp/ServerConnection/$(PluginLibraryURL)$]][prefix[$:/temp/RemoteAssetInfo/$(PluginLibraryURL)$]]"/> \end \define plugin-library-listing() <$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
!! <$link><$transclude field="caption"><$view field="title"/> //<$view field="url"/>// <$transclude/> <$set name=PluginLibraryURL value={{!!url}}> <> <>
\end \import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
<>