2024-01-17 22:41:41 +00:00
|
|
|
title: MultiWikiServer Administration
|
|
|
|
|
2024-01-19 11:03:58 +00:00
|
|
|
\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-23 12:52:40 +00:00
|
|
|
<!-- Expects currentTiddler to be the title of a bag entity state tiddler -->
|
|
|
|
\procedure bagPill(element-tag:"span",is-topmost:"no")
|
|
|
|
\whitespace trim
|
|
|
|
<$genesis $type=<<element-tag>> class={{{ mws-bag-pill [<is-topmost>match[yes]then[mws-bag-pill-topmost]] +[join[ ]] }}}>
|
2024-01-23 14:29:50 +00:00
|
|
|
<a class="mws-bag-pill-link" href=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
|
|
|
|
<$image source=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon-small"/>
|
|
|
|
<span class="mws-bag-pill-label">
|
|
|
|
<$text text={{!!bag-name}}/>
|
|
|
|
</span>
|
|
|
|
</a>
|
2024-01-23 12:52:40 +00:00
|
|
|
</$genesis>
|
|
|
|
\end
|
|
|
|
|
|
|
|
<!-- Expects currentTiddler to be the title of a recipe entity state tiddler -->
|
|
|
|
\procedure wikiCard()
|
|
|
|
\whitespace trim
|
|
|
|
<a class="mws-wiki-card" href=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
|
|
|
|
<div class="mws-wiki-card-image">
|
2024-01-23 14:29:50 +00:00
|
|
|
<$image source=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$/recipes/${ [{!!recipe-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon"/>
|
2024-01-23 12:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="mws-wiki-card-content">
|
|
|
|
<div class="mws-wiki-card-header">
|
|
|
|
<$text text={{!!recipe-name}}/>
|
|
|
|
</div>
|
|
|
|
<div class="mws-wiki-card-meta">
|
2024-01-23 14:29:50 +00:00
|
|
|
<%if [list<currentTiddler>] %>
|
|
|
|
<ol class="mws-horizontal-list">
|
|
|
|
<$list filter="[list<currentTiddler>]" counter="counter">
|
|
|
|
<$transclude $variable="bagPill" is-topmost={{{ [<counter-last>match[yes]] }}} element-tag="li"/>
|
|
|
|
</$list>
|
|
|
|
</ol>
|
|
|
|
<%else%>
|
|
|
|
(no bags defined)
|
|
|
|
<%endif%>
|
2024-01-23 12:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="mws-wiki-card-description">
|
2024-01-23 16:52:11 +00:00
|
|
|
<$text text={{!!text}}/>
|
2024-01-23 12:52:40 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
\end
|
|
|
|
|
2024-01-17 22:41:41 +00:00
|
|
|
<div class="mws-admin-container">
|
2024-01-23 12:52:40 +00:00
|
|
|
<h1>Wikis</h1>
|
|
|
|
<p>
|
|
|
|
These are the wikis available on this server. Click on a wiki to visit it in a new browser tab.
|
|
|
|
</p>
|
|
|
|
<ul class="mws-vertical-list">
|
2024-01-23 14:29:50 +00:00
|
|
|
<$list filter="[prefix[_multiwikiserver/recipes/]]">
|
2024-01-20 21:50:12 +00:00
|
|
|
<li>
|
2024-01-23 12:52:40 +00:00
|
|
|
<<wikiCard>>
|
2024-01-20 21:50:12 +00:00
|
|
|
</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>
|
2024-01-23 12:52:40 +00:00
|
|
|
<ul class="mws-vertical-list">
|
2024-01-23 14:29:50 +00:00
|
|
|
<$list filter="[prefix[_multiwikiserver/bags/]]">
|
2024-01-20 21:50:12 +00:00
|
|
|
<li>
|
2024-01-23 12:52:40 +00:00
|
|
|
<<bagPill>>
|
2024-01-20 21:50:12 +00:00
|
|
|
</li>
|
|
|
|
</$list>
|
|
|
|
</ul>
|
|
|
|
<div>
|
|
|
|
<<createBagButton>>
|
|
|
|
</div>
|
2024-01-19 11:03:58 +00:00
|
|
|
</div>
|