MyShaarli/tpl/myShaarli/pluginsadmin.html

150 lines
4.9 KiB
HTML
Raw Permalink Normal View History

2018-01-04 14:47:54 +01:00
<!DOCTYPE html>
<html{if="$language !=='auto'"} lang=" {$language}"{/if}>
2018-01-04 14:47:54 +01:00
<head>
{include="includes"}
</head>
2018-01-04 14:47:54 +01:00
<body>
{include="page.header"}
2018-01-04 14:47:54 +01:00
<noscript>
<div class="pure-g new-version-message pure-alert pure-alert-warning">
<div class="pure-u-2-24"></div>
<div class="pure-u-20-24">
{'You have to enable JavaScript to change plugin loading order.'|t}
</div>
</div>
<div class="clear"></div>
</noscript>
<section>
<h2 class="window-title">{'Plugin administration'|t}</h2>
2018-01-04 14:47:54 +01:00
<form method="POST" action="{$base_path}/admin/plugins" name="pluginform" id="pluginform">
<fieldset id="enabled_plugins">
<legend class="window-subtitle">{'Enabled Plugins'|t}</legend>
2018-01-04 14:47:54 +01:00
{if="count($enabledPlugins)==0"}
<p>{'No plugin enabled.'|t}</p>
2018-01-04 14:47:54 +01:00
{else}
<table id="plugin_table">
<thead>
<tr>
<th>{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th>{'Description'|t}</th>
<th>{'Order'|t}</th>
2018-01-04 14:47:54 +01:00
</tr>
</thead>
<tbody>
{loop="$enabledPlugins"}
<tr data-line="{$key}" data-order="{$counter}">
<td class="text-center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
<td>
<label for="{$key}">{function="str_replace('_', ' ', $key)"}</label>
</td>
<td>{$value.description}</td>
<td class="text-center">
{if="count($enabledPlugins)>1"}
<a href="#" class="order order-up"></a>
<a href="#" class="order order-down"></a>
{/if}
<input type="hidden" name="order_{$key}" value="{$counter}">
</td>
</tr>
2018-01-04 14:47:54 +01:00
{/loop}
</tbody>
<tfoot>
<tr>
<th>{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th>{'Description'|t}</th>
<th>{'Order'|t}</th>
2018-01-04 14:47:54 +01:00
</tr>
</tfoot>
</table>
{/if}
</fieldset>
2018-01-04 14:47:54 +01:00
<fieldset id="disabled_plugins">
<legend class="window-subtitle">{'Disabled Plugins'|t}</legend>
2018-01-04 14:47:54 +01:00
{if="count($disabledPlugins)==0"}
<p>{'No plugin disabled.'|t}</p>
2018-01-04 14:47:54 +01:00
{else}
<table>
<thead>
<tr>
<th>{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th>{'Description'|t}</th>
2018-01-04 14:47:54 +01:00
</tr>
</thead>
<tbody>
{loop="$disabledPlugins"}
<tr>
<td class="text-center"><input type="checkbox" name="{$key}" id="{$key}"></td>
<td>
<label for="{$key}">{function="str_replace('_', ' ', $key)"}</label>
</td>
<td>
{$value.description}
</td>
</tr>
2018-01-04 14:47:54 +01:00
{/loop}
</tbody>
<tfoot>
<tr>
<th>{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th>{'Description'|t}</th>
2018-01-04 14:47:54 +01:00
</tr>
</tfoot>
</table>
{/if}
</fieldset>
<p>
{"More plugins available"|t}
<a href="{$root_path}/doc/html/Community-&-Related-software/#third-party-plugins">{"in the documentation"|t}</a>.
</p>
2018-01-04 14:47:54 +01:00
<input type="submit" value="{'Save'|t}" name="save">
<input type="hidden" name="token" value="{$token}">
</form>
</section>
2018-01-04 14:47:54 +01:00
<section>
2018-01-04 14:47:54 +01:00
<h2 class="window-title">{'Plugin configuration'|t}</h2>
<form action="{$base_path}/admin/plugins" method="POST">
{if="count($enabledPlugins)==0"}
<p>{'No plugin enabled.'|t}</p>
{else}
{$nbParameters=0}
{loop="$enabledPlugins"}
{$nbParameters=$nbParameters+count($value.parameters)}
{if="count($value.parameters) > 0"}
<fieldset class="plugin_parameters">
<legend class="window-subtitle">{function="str_replace('_', ' ', $key)"}</legend>
{loop="$value.parameters"}
<label for="{$key}">{$key}
{if="isset($value.desc)"}
&middot; {$value.desc}
2018-10-05 11:55:51 +02:00
{/if}
</label>
<input name="{$key}" value="{$value.value}" id="{$key}" type="text" />
{/loop}
</fieldset>
{/if}
{/loop}
{if="$nbParameters===0"}
<p>{'No parameter available.'|t}</p>
{else}
<input type="submit" name="parameters_form" value="{'Save'|t}" />
{/if}
{/if}
<input type="hidden" name="token" value="{$token}">
</form>
</section>
{include="page.footer"}
<script src="{$asset_path}/js/pluginsadmin.min.js?v={$version_hash}#"></script>
</body>
2018-01-04 14:47:54 +01:00
</html>