title: $:/core/ui/ControlPanel/Modals/AddPlugins subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}} \define install-plugin-actions() <$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=<>/> \end \define install-plugin-button()
<$set name="libraryVersion" value={{{ [get[version]] }}}> <$set name="installedVersion" value={{{ [get[original-title]get[version]] }}}> <$set name="reinstall-type" value={{{ [compare:version:eqthen[tc-reinstall]] [compare:version:gtthen[tc-reinstall-upgrade]] [compare:version:ltthen[tc-reinstall-downgrade]] }}}> <$button actions=<> class={{{ [get[original-title]has[version]then] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> {{$:/core/images/download-button}} <$list filter="[get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}"> <$list filter="[compare:version:gt]" variable="ignore" emptyMessage=""" <$list filter="[compare:version:lt]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}"> {{$:/language/ControlPanel/Plugins/Downgrade/Caption}} """> {{$:/language/ControlPanel/Plugins/Update/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"/>
<$list filter="[get[original-title]get[version]]" variable="installedVersion">
{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}
<>
<$set name="original-title" value={{{ [get[original-title]] }}}> <$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"/>
<$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]]" variable="assetInfo"> <>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginlimit[1]]" variable="ignore"> <$reveal type="nomatch" text="yes" state=<> tag="div" class="tc-plugin-info-sub-plugin-indicator"> <$wikify name="count" text="""<$count filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin]"/>"""> <$button class="tc-btn-invisible" set=<> setTo="yes"> {{$:/language/ControlPanel/Plugins/SubPluginPrompt}} \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]]" 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]]
<>