1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-06 10:06:19 +00:00
TiddlyWiki5/plugins/tiddlywiki/multiwikiserver/admin-ui/MultiWikiServer Administration.tid

89 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-01-17 22:41:41 +00:00
title: MultiWikiServer Administration
\procedure createBag(name)
\procedure completion-createBag()
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$action-log msg="In completion-createBag"/>
<$action-log/>
\end completion-createBag
<$action-sendmessage
$message="tm-http-request"
url=`/wiki/$(name)$/bags/$(name)$`
method="PUT"
oncompletion=<<completion-createBag>>
/>
\end createBag
\procedure createBagButton(name)
<$button class="">
<$transclude $variable="createBag" name={{$:/state/NewBagName}}/>
{{$:/core/images/new-button}}
</$button><span class="tc-btn-text"><$text text="Create a new bag:"/></span><$edit-text tiddler="$:/state/NewBagName" tag="input"/>
\end createBagButton
\procedure createRecipe(name)
\procedure completion-createRecipe()
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$action-log msg="In completion-createRecipe"/>
<$action-log/>
\end completion-createRecipe
<$action-sendmessage
$message="tm-http-request"
url=`/wiki/$(name)$/recipes/$(name)$`
method="PUT"
oncompletion=<<completion-createRecipe>>
/>
\end createRecipe
\procedure createRecipeButton(name)
<$button class="">
<$transclude $variable="createRecipe" name={{$:/state/NewRecipeName}}/>
{{$:/core/images/new-button}}
</$button><span class="tc-btn-text"><$text text="Create a new recipe:"/></span><$edit-text tiddler="$:/state/NewRecipeName" tag="input"/>
\end createRecipeButton
2024-01-17 22:41:41 +00:00
<div class="mws-admin-container">
<h1>Recipes</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/recipes/]]">
<li>
<a href=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<img src=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$/recipes/${ [{!!recipe-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon"/>
<$text text={{!!recipe-name}}/>
</a>
<ol>
<$list filter="[list<currentTiddler>]">
<li>
<$text text=<<currentTiddler>>/>
</li>
</$list>
</ol>
</li>
</$list>
</ul>
<div>
<<createRecipeButton>>
</div>
<div>
Higher numbered bags take priority if a tiddler with the same title is in more than one bag
</div>
<h1>Bags</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/bags/]]">
<li>
<a href=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<img src=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon"/>
<$text text={{!!bag-name}}/>
</a>
</li>
</$list>
</ul>
<div>
<<createBagButton>>
</div>
</div>