MyShaarli/tpl/myShaarli/pluginsadmin.html

184 lines
6.7 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>
<body>
{include="page.header"}
<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">
2023-05-25 11:13:43 +02:00
{'You have to enable JavaScript to change plugin loading order.'|t}
2018-01-04 14:47:54 +01:00
</div>
</div>
<div class="clear"></div>
</noscript>
2023-05-25 11:13:43 +02:00
<form method="POST" action="{$base_path}/admin/plugins" name="pluginform" id="pluginform" class="pluginform-container">
2018-01-04 14:47:54 +01:00
<div class="pure-g">
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
<h2 class="window-title">{'Plugin administration'|t}</h2>
<section id="enabled_plugins">
<h3 class="window-subtitle">{'Enabled Plugins'|t}</h3>
<div>
{if="count($enabledPlugins)==0"}
2018-10-05 11:55:51 +02:00
<p class="center">{'No plugin enabled.'|t}</p>
2018-01-04 14:47:54 +01:00
{else}
<table id="plugin_table">
<thead>
<tr>
2023-05-25 11:13:43 +02:00
<th class="center">{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
<th class="center">{'Order'|t}</th>
</tr>
</thead>
<tbody>
{loop="$enabledPlugins"}
<tr data-line="{$key}" data-order="{$counter}" class="main-row">
<td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
<td class="center">
<label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
</td>
<td><div class="pure-u-0 pure-u-lg-visible"><label for="{$key}">{$value.description}</label></div></td>
<td class="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>
<tr data-line="{$key}" data-order="{$counter}" class="pure-u-lg-0 mobile-row">
<td colspan="4"><label for="{$key}">{$value.description}</label></td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
2023-05-25 11:13:43 +02:00
<th class="center">{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
<th class="center">{'Order'|t}</th>
</tr>
</tfoot>
</table>
{/if}
</div>
</section>
<section id="disabled_plugins">
<h3 class="window-subtitle">{'Disabled Plugins'|t}</h3>
<div>
{if="count($disabledPlugins)==0"}
2018-10-05 11:55:51 +02:00
<p class="center">{'No plugin disabled.'|t}</p>
2018-01-04 14:47:54 +01:00
{else}
<table>
<thead>
<tr>
2023-05-25 11:13:43 +02:00
<th class="center">{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
</tr>
</thead>
<tbody>
{loop="$disabledPlugins"}
<tr class="main-row">
<td class="center"><input type="checkbox" name="{$key}" id="{$key}"></td>
<td class="center">
<label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
</td>
<td><div class="pure-u-0 pure-u-lg-visible">
<label for="{$key}">{$value.description}</label>
</div></td>
</tr>
<tr class="pure-u-lg-0 mobile-row">
<td colspan="3"><label for="{$key}">{$value.description}</label></td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
2023-05-25 11:13:43 +02:00
<th class="center">{'Enabled'|t}</th>
2018-01-04 14:47:54 +01:00
<th>{'Name'|t}</th>
<th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
</tr>
</tfoot>
</table>
{/if}
</div>
</section>
<div class="center more">
2018-10-05 11:55:51 +02:00
{"More plugins available"|t}
2023-05-25 11:13:43 +02:00
<a href="{$root_path}/doc/html/Community-&-Related-software/#third-party-plugins">{"in the documentation"|t}</a>.
2018-01-04 14:47:54 +01:00
</div>
<div class="center">
<input type="submit" value="{'Save'|t}" name="save">
</div>
</div>
</div>
<input type="hidden" name="token" value="{$token}">
</form>
2023-05-25 11:13:43 +02:00
<form action="{$base_path}/admin/plugins" method="POST">
2018-01-04 14:47:54 +01:00
<div class="pure-g">
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light">
<h2 class="window-title">{'Plugin configuration'|t}</h2>
<section id="plugin_parameters">
<div>
{if="count($enabledPlugins)==0"}
2018-10-05 11:55:51 +02:00
<p class="center">{'No plugin enabled.'|t}</p>
2018-01-04 14:47:54 +01:00
{else}
2018-10-05 11:55:51 +02:00
{$nbParameters=0}
2018-01-04 14:47:54 +01:00
{loop="$enabledPlugins"}
2018-10-05 11:55:51 +02:00
{$nbParameters=$nbParameters+count($value.parameters)}
2018-01-04 14:47:54 +01:00
{if="count($value.parameters) > 0"}
<div class="plugin_parameters">
<h3 class="window-subtitle">{function="str_replace('_', ' ', $key)"}</h3>
{loop="$value.parameters"}
<div class="plugin_parameter">
<p class="float_label">
<label for="{$key}">
<code>{$key}</code>
{if="isset($value.desc)"}
&middot; {$value.desc}
{/if}
</label>
</p>
<div class="float_input">
<input name="{$key}" value="{$value.value}" id="{$key}" type="text" />
</div>
</div>
{/loop}
</div>
{/if}
{/loop}
2018-10-05 11:55:51 +02:00
{if="$nbParameters===0"}
<p class="center">{'No parameter available.'|t}</p>
{else}
<div class="center">
<input type="submit" name="parameters_form" value="{'Save'|t}"/>
</div>
{/if}
2018-01-04 14:47:54 +01:00
{/if}
</div>
</section>
</div>
</div>
2023-05-25 11:13:43 +02:00
<input type="hidden" name="token" value="{$token}">
2018-01-04 14:47:54 +01:00
</form>
{include="page.footer"}
2023-05-25 11:13:43 +02:00
<script src="{$asset_path}/js/pluginsadmin.min.js?v={$version_hash}#"></script>
2018-01-04 14:47:54 +01:00
</body>
</html>