Commit f2262dee authored by Robert Lyon's avatar Robert Lyon
Browse files

List un-installed plugins first for easier spotting (Bug #1206306)



Also getting the 'not installed plugins' title to be removed by js if last
un-installed in plugin for the plugin type has been added

Change-Id: I2223284aa1e9d5f5188bf199462260886036dd8f
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 1577d5b2
......@@ -162,7 +162,12 @@ function installplugin(name) {
// new parent node
var bits = name.split('\.');
var newparent = $(bits[0] + '.installed');
appendChildNodes(newparent, $(name));
var oldparent = $(name).parentNode;
insertSiblingNodesBefore(newparent, $(name));
// If there are no more plugins left for this type to be installed
if (oldparent.children.length == 0) {
oldparent.parentNode.style.display = 'none';
}
}
else {
var message = '';
......
......@@ -764,6 +764,9 @@ input#institution_suspend_submit {
list-style: none;
margin: 3px 0 0 0;
}
#adminplugin ul.adminpluginstypes ul li.notinstalled {
margin-bottom: 10px;
}
#adminplugin ul.adminpluginstypes ul ul ul li {
list-style: disc;
margin: 0 0 3px 15px;
......
......@@ -9,6 +9,23 @@
{assign var="installed" value=$plugins.installed}
{assign var="notinstalled" value=$plugins.notinstalled}
<ul>
{if $notinstalled}
<li class="notinstalled"><b>{str tag='notinstalledplugins'}</b>
<ul id="{$plugintype}.notinstalled">
{foreach from=$notinstalled key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.notinstallable}
{str tag='notinstallable'}: {$data.notinstallable}
{else}
<span id="{$plugintype}.{$plugin}.install">(<a href="" onClick="{$installlink}('{$plugintype}.{$plugin}'); return false;">{str tag='install' section='admin'}</a>)</span>
{/if}
<span id="{$plugintype}.{$plugin}.message"></span>
</li>
{/foreach}
</ul>
</li>
{/if}
<li><b>{str tag='installedplugins'}</b>
<ul id="{$plugintype}.installed">
{foreach from=$installed key='plugin' item='data'}
......@@ -35,22 +52,6 @@
{/foreach}
</ul>
</li>
{if $notinstalled}
<li><b>{str tag='notinstalledplugins'}</b>
<ul id="{$plugintype}.notinstalled">
{foreach from=$notinstalled key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.notinstallable}
{str tag='notinstallable'}: {$data.notinstallable}
{else}
<span id="{$plugintype}.{$plugin}.install">(<a href="" onClick="{$installlink}('{$plugintype}.{$plugin}'); return false;">{str tag='install' section='admin'}</a>)</span>
{/if}
<span id="{$plugintype}.{$plugin}.message"></span>
</li>
{/foreach}
</ul>
</li>
{/if}
</ul>
</li>
{/foreach}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment