2015-06-11 04:27:04 +02:00
|
|
|
<?php
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::link(array(
|
|
|
|
'title'=>$L->g('Change the position of the plugins'),
|
|
|
|
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
|
2019-05-24 18:59:53 +02:00
|
|
|
'icon'=>'arrows'
|
2018-04-27 20:36:43 +02:00
|
|
|
));
|
2018-02-06 18:26:59 +01:00
|
|
|
|
2019-05-11 20:32:46 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins')));
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
2019-05-24 19:25:00 +02:00
|
|
|
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
2019-05-11 20:32:46 +02:00
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#search").on("keyup", function() {
|
|
|
|
var textToSearch = $(this).val().toLowerCase();
|
|
|
|
$(".searchItem").each( function() {
|
|
|
|
var item = $(this);
|
|
|
|
item.hide();
|
|
|
|
item.children(".searchText").each( function() {
|
|
|
|
var element = $(this).text().toLowerCase();
|
|
|
|
if (element.indexOf(textToSearch)!=-1) {
|
|
|
|
item.show();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Enabled plugins')));
|
|
|
|
|
2015-10-19 00:45:58 +02:00
|
|
|
echo '
|
2019-05-11 20:32:46 +02:00
|
|
|
<table class="table">
|
2018-04-27 20:36:43 +02:00
|
|
|
<tbody>
|
2015-10-19 00:45:58 +02:00
|
|
|
';
|
|
|
|
|
2019-05-11 20:32:46 +02:00
|
|
|
// Show installed plugins
|
|
|
|
foreach ($pluginsInstalled as $plugin) {
|
|
|
|
echo '<tr id="'.$plugin->className().'" class="bg-light searchItem">';
|
2015-06-12 06:00:04 +02:00
|
|
|
|
2019-05-11 20:32:46 +02:00
|
|
|
echo '<td class="align-middle pt-3 pb-3 w-25">
|
|
|
|
<div class="searchText">'.$plugin->name().'</div>
|
2018-04-27 20:36:43 +02:00
|
|
|
<div class="mt-1">';
|
|
|
|
if (method_exists($plugin, 'form')) {
|
|
|
|
echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>';
|
|
|
|
}
|
|
|
|
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>';
|
|
|
|
echo '</div>';
|
2017-06-09 20:30:13 +02:00
|
|
|
echo '</td>';
|
2016-08-10 01:46:56 +02:00
|
|
|
|
2019-05-11 20:32:46 +02:00
|
|
|
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
|
|
|
echo $plugin->description();
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
|
|
|
echo '<span>'.$plugin->version().'</span>';
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
|
|
|
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
|
|
|
|
</td>';
|
|
|
|
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
';
|
|
|
|
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Disabled plugins')));
|
|
|
|
|
|
|
|
echo '
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
';
|
|
|
|
|
|
|
|
// Plugins not installed
|
|
|
|
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled);
|
|
|
|
foreach ($pluginsNotInstalled as $plugin) {
|
|
|
|
echo '<tr id="'.$plugin->className().'" class="searchItem">';
|
|
|
|
|
|
|
|
echo '<td class="align-middle pt-3 pb-3 w-25">
|
|
|
|
<div class="searchText">'.$plugin->name().'</div>
|
|
|
|
<div class="mt-1">
|
|
|
|
<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>
|
|
|
|
</div>
|
|
|
|
</td>';
|
|
|
|
|
|
|
|
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
2018-04-27 20:36:43 +02:00
|
|
|
echo $plugin->description();
|
2017-03-14 05:21:25 +01:00
|
|
|
echo '</td>';
|
2017-06-09 20:30:13 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
|
|
|
echo '<span>'.$plugin->version().'</span>';
|
2017-06-09 20:30:13 +02:00
|
|
|
echo '</td>';
|
2017-04-26 20:16:34 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
|
|
|
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
|
|
|
|
</td>';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2015-11-30 01:45:30 +01:00
|
|
|
echo '</tr>';
|
|
|
|
}
|
2015-10-19 00:45:58 +02:00
|
|
|
|
|
|
|
echo '
|
2018-04-27 20:36:43 +02:00
|
|
|
</tbody>
|
2015-10-19 00:45:58 +02:00
|
|
|
</table>
|
2015-11-30 01:45:30 +01:00
|
|
|
';
|